CLASSEVE
RouteResearch
Research note · measured Aug 15, 2026 · published Aug 15, 2026

What the polish pass changes, and what it never touches: the 31-case golden corpus

Lven Instant runs a deterministic pass over each transcript before it types it: hyphen-fragment and stutter pruning, n-gram repeat collapse, filler purge, contraction and proper-noun restoration, sentence casing, and terminal punctuation. No language model, no network, no regular expressions on the hot path; the same input always yields the same output. We compiled the polisher's golden regression corpus — 31 input/expected pairs that CI holds every platform's implementation to — against the shipped Windows source and ran it on the publication date: 31 of 31 pass. Across the corpus, 154 words go in and 134 come out; zero words are inserted; 20 are removed and every one is a stutter fragment, a filler, or a repeat; one word is spelling-restored (accellent → excellent); 3 gain an apostrophe; the remaining differences are casing.

What the pass is

After the speech model returns text, and before Lven types it into the focused app, a single-pass token-stream engine (LvenStructuralPolisher, shipped as C++ on Windows and Linux and as Kotlin on Android, byte-identical contracts held by a shared golden corpus) applies seven rules in a fixed order: hyphen-fragment pruning; prefix-stutter pruning; n-gram repetition collapse for n = 1, 2, 3; filler purge (uh, um, eh, er, ah, uh-huh); contraction, proper-noun and phonetic-spelling restoration from a fixed table; sentence casing; terminal punctuation, where the last sentence decides ? versus period.

It is not a language model. It cannot rephrase, restructure, change tense, match tone to an app, or decide what you meant. It has no network access. Given the same transcript it produces the same text every time, on every platform.

Method

The corpus is the polisher's own golden regression test — the file CI runs on every commit and regenerates for the Swift ports, so that all implementations are held to one contract. We compiled tests/polisher_golden_test.cpp against the shipped Lven-Windows/src/instant/lven_polish.cpp with a stock LLVM MinGW g++ (-std=c++17) on 2026-08-15 and ran the binary; it asserts every expected output and returns non-zero on any mismatch. Word counts and change classes were then computed over the 31 pairs with a token diff (case- and apostrophe-insensitive alignment, then classification of each difference).

Results

MeasureValue
Golden cases31 of 31 pass
Words in → out154 → 134
Words inserted0
Words removed20 — all stutter fragments, fillers, or repeats
Spelling restored1 (accellent → excellent)
Apostrophe restored3 (dont, im, ive)
Casing-only changes37 (sentence starts; NVIDIA, CUDA, GitHub)
Words kept byte-identical93

Every word that survives is a word the speaker said. The only substitution in the corpus is a spelling restoration from a fixed table; nothing is paraphrased and nothing is added.

The pairs

CaseInputOutput
flagshipst- st- study shows that c- c- computer is really fast and running on a g- g- gpu you know like you know we have accellent resultsStudy shows that computer is really fast and running on a GPU you know like you know we have excellent results.
filler-commaum, hello thereHello there.
filler-periodum. yes. it worksYes. It works.
triple-repno no noNo.
quad-repvery very very very goodVery good.
ill-wordhe was illHe was ill.
as-guardas aspects go this is fineAs aspects go this is fine.
question-lastthe weather is nice. is it rainingThe weather is nice. Is it raining?
statement-lastis it done. the work was hardIs it done. The work was hard.
rep-commai think, i think we should leaveI think we should leave.
single-stuttere everyone is hereEveryone is here.
digit-not-stutter4 400 meters4 400 meters.
long-fragmentcompu- computer worksComputer works.
dangling-hyphenwell- that is fineWell that is fine.
the-thei want to go to the the storeI want to go to the store.
contractionsdont worry im fine ive got itDon't worry I'm fine I've got it.
proper-nounslven runs on nvidia cuda and githubLven runs on NVIDIA CUDA and GitHub.
question-markwhat time is itWhat time is it?
legit-hadwe had had a long talkWe had had a long talk.
legit-thatthe reason is that that fileThe reason is that that file.
is-is-collapsethe file is is brokenThe file is broken.
has-has-collapseshe has has itShe has it.
boundary-youthank you. you are welcomeThank you. You are welcome.
boundary-stopstop. stop itStop. Stop it.
trailing-hyphen-keepi was talking about the co-I was talking about the co.
trailing-hyphen-soloco-Co.
nonascii-ecoleécole is openÉcole is open.
nonascii-uberüber coolÜber cool.
dangling-commashello,,,Hello.
empty(empty)(empty)
pure-punct...(empty)

Note what is preserved: 'you know like you know' in the first case stays, because it is not in the filler list and the engine does not judge whether a phrase is worth keeping. 'had had' and 'that that' stay, because the collapse pass guards legitimate doubles.

Why deterministic

A generative cleanup layer optimises for text that reads well. That is a real product goal and some people want it. Its cost is that every sentence has to be re-read for meaning, because the layer is allowed to decide what you meant; in July 2026 one cloud dictation vendor traced accuracy complaints to its cleanup default having changed words users had not asked it to touch. A deterministic pass optimises for the text being what you said. Its cost is that it will not turn a rambling sentence into a clean one. We chose the second, and this corpus is what that choice looks like in practice.

Reproduce it

From a checkout of the Lven Instant source, at the repository root: g++ -std=c++17 -I Lven-Windows/src/instant tests/polisher_golden_test.cpp Lven-Windows/src/instant/lven_polish.cpp -o polish_golden && ./polish_golden. The binary prints the pass count and exits non-zero on any mismatch. The Kotlin and Swift ports are held to the same corpus through tests/polisher_golden_cases.json.

Limitations.

  • This measures our own pass, on its own regression corpus. It is not a comparison against any other product's output on the same audio; we have not run one and do not publish numbers for other vendors here.
  • The corpus is a regression suite designed to exercise each rule, not a random sample of real dictation. Real-speech proportions of stutters, fillers and repeats will differ.
  • Repeat collapse flattens intentional emphasis: 'very very very very good' becomes 'Very good'. If you repeat a word for effect, the pass will not know.
  • Restoration (contractions, proper nouns, phonetic spellings) comes from a fixed table; a word not in the table is left as the model produced it.
  • The speech model upstream of this pass has its own error rate, measured separately in the on-device ASR report. This report is about what happens after recognition, not recognition itself.
  • First-party measurement, run by ClassEve on the publication date.