Build1 distinct publisher3 min readUpdated
A small library restores terminal punctuation on speech-to-text and truncated LLM output with ordered regexes. The interesting part is what the deterministic path costs you instead.
The Engineer · Build desk
Compiled by The EngineerSomething wrong?How this is made
What you outsource when you post a transcript to a model is a choice between three symbols [5][6]. The model resolves that choice by sampling, which is why the same sentence can come back two ways [3]. So the trade is an open-ended generator plus a round trip you can feel, set against keeping a rule list yourself [3].
The rules are not hidden. In unpunctuated English, interrogatives overwhelmingly open with an auxiliary or a wh-word, and exclamatives have their own recognizable openers [7]. "can you" does not require inference [7]. The author's library, sentencify, walks an ordered array of regular expressions per language, returns the type of the first rule that matches, and defaults to declarative when nothing does [8][12].
Where it stops being an afternoon's work is the second locale. Appending a mark is only correct in some languages: Spanish needs an inverted question mark prepended as well as the closing one appended, French typography puts a space before the question mark, exclamation mark and colon, and Japanese uses its own full-width period and question mark rather than the ASCII characters [10]. With six languages shipping, that is eighteen language-and-type outputs to get right [11], and the detection cues do not transfer between them, since a rule that recognises an English auxiliary tells you nothing about Japanese [17].
The fragility is in the same design decision that makes it readable. First match wins, so a broad interrogative rule sitting above a narrow exclamatory one will swallow it silently, and nobody finds out until a user reports one specific sentence coming out wrong [13]. The author names the alternative, scoring every match and taking the highest confidence, calls it more robust and considerably harder to debug, and says he is not certain he chose correctly [14]. That hedge is worth more than a marketing line, because it tells you where to look when the output is wrong. So does exporting the rule table, which lets you find the rule that fired instead of guessing [15].
No accuracy figure is published in the post [18]. That matters for how you read the determinism claim [16]: what you are guaranteed is that a misclassification repeats identically, not that there are fewer of them. A deterministic wrong answer is a fixture you write once and fix once; a sampled wrong answer is a flake you can only re-roll [19]. That is also what makes the synchronous path usable on every keystroke or every streamed token, where a model call cannot go at all [16].
Which puts the real value somewhere other than the English regexes. The author says you could write the naive English version yourself in an afternoon [17]. The part you would not write is the per-locale typography, and the part you would get wrong is the ordering. Both are now someone else's ordered array, published where you can read it [15].
Follow any of these and your For You feed starts watching them — no settings page required.
Ranked by verification strength, evidence, and original report placement.
The instinctive fix of sending the text back through a model to clean it up works, but costs a network round trip, billed tokens, perceptible latency and a nondeterministic result for an almost entirely mechanical task.
In unpunctuated English, interrogatives overwhelmingly start with an auxiliary or a wh-word and exclamatives have their own recognizable openers, so no language model is needed to notice 'can you'.
sentencify currently supports six languages: English, Japanese, German, Spanish, French and Portuguese.
The library is described as deterministic (same input, same output, assertable), synchronous with no promise, warm-up or cold start, and idempotent, and as cheap enough to run on every keystroke in a controlled input or every token in a stream.
A Web Speech API onresult handler returns an accurate transcript such as 'can you send me the report' with no leading capital and no question mark.
The same missing terminal punctuation appears in streamed LLM tokens that get cut off before the final mark, and in form fields where users type fast and do not bother.
Evidence-backed comparisons of source perspectives and observed adoption signals. Read the methodology
Which Builder, Operator, and Investor concerns the observed source mix emphasized—not a truth score.
Evidence, demonstrated adoption, hype gap, incentives, and confidence are assessed independently, each on its own current evidence. How these are measured.
Self-authored, illustrated by examples, unmeasured
All evidence comes from one post written by the library's author. Mechanism claims are well specified and internally checkable — the SpeechRecognition snippet, the correctSentence outputs, the exported rule type, the first-match-with-declarative-fallback algorithm — and the locale typography requirements are independently well-known conventions. But the load-bearing quality question (how often the ordered regexes classify correctly) is supported only by hand-picked examples plus one acknowledged failure class, with no accuracy figure, error rate, evaluation set or third-party replication anywhere in the cluster.
Announcement-stage, no usage disclosed
The only adoption signal in the cluster is that the package exists and is installable from npm with six languages and a documented API surface. No download counts, dependent packages, stars, issues, contributors or named production users are disclosed, and the author frames usage prospectively ('the pattern I'd suggest') rather than reporting deployments.
Slightly understated relative to its own framing
The post is unusually self-limiting for a library announcement: it caps scope ('not a grammar checker'), names the failure class regexes lose on, calls first-match fragility 'the main thing that makes it fragile', states the author is not certain his design choice was right, and positions the tool as a cheap finishing pass rather than a model replacement. Those disclosures pull claims slightly below what the mechanism arguably supports, which is why the gap is mildly negative rather than positive. It is not more negative because the production properties and the per-keystroke cost claim are asserted without any measurement, and there is no adoption to back the implied usefulness.
Author promoting his own package
The single source is written by the library's author on a developer-publishing platform, including install instructions — a direct distribution and reputation incentive to make the deterministic path look like the right default over a model call. That incentive is partly offset by voluntary disclosure of fragility, an acknowledged failure class, explicit scope limits and stated uncertainty about the design, and by the absence of any paid product, pricing tier or sponsor in the cluster.
Moderate on mechanism, low on outcomes
Confidence is reasonable that the library behaves as described architecturally — regex classification, first-match ordering, synchronous dependency-free execution — because those claims are specific, internally consistent and cheap for any reader to check against the package. Confidence is low on everything that would decide adoption: classification accuracy, real-world coverage across eighteen language-and-type cells, and whether anyone uses it. One publisher, one self-interested source, zero measurements.
build
Allow-list the closed set, block-list the open one: 193 thin geo pages, one gate1 distinct publisher
build
A GAN beauty filter is a device budget allocation, not a feature toggle1 distinct publisher
build
Your inference bill is an architecture defect: declare the task before you call the model1 distinct publisher
build
The NestJS default path puts the query inside the business rule, and nothing fails when it moves1 distinct publisher
Distinct publishers with included, body-backed reporting in this cluster.
dev.to
1 article · August 22, 2026