Skip to content

Keep the comma in front of a filler again before 0.6.0 - #38

Merged
tobymarks merged 2 commits into
mainfrom
fix/tidy-keeps-needed-commas
Oct 29, 2026
Merged

tobymarks merged 2 commits into
mainfrom
fix/tidy-keeps-needed-commas

Conversation

@tobymarks

Copy link
Copy Markdown
Owner

Two fixes found while checking the Mac 0.6.0 release, before anything was published.

Tidy: keep the comma in front of a filler (takes back #30.1)

#31 made "Tidy up dictations" drop both commas around a filler (Das Meeting ist, äh, um zehn. → Das Meeting ist um zehn.). But most commas in front of a filler belong to the sentence. 0.5.1 kept these; #31 deleted them:

Dictated 0.5.1 and this PR main before this PR
Ich glaube, äh, dass das stimmt. Ich glaube, dass das stimmt. Ich glaube dass das stimmt.
Hallo Anna, ähm, wie geht es dir? Hallo Anna, wie geht es dir? Hallo Anna wie geht es dir?
Thomas, äh, kannst du das übernehmen? Thomas, kannst du … Thomas kannst du …
Yes, uh, that works. Yes, that works. Yes that works.

A stress test ran 528 realistic sentences with a filler between two commas through three versions: German letters and chat, German speech and prompts, and English. Each was compared with the correct commas, and every reported failure went to a second checker.

Version correct
0.5.1 rule (first comma stays) 356 (67 %)
#30.1 (both go) 221 (42 %)
#30.1 plus word lists for clause words, greetings, answers, sign-offs and opening clauses 250 (47 %)

The sentences leaned towards boundaries where a comma is needed. Even so, the word lists were whack-a-mole: relative and infinitive clauses, names, appositions and enumerations stayed broken, and "Danke, äh, für …" and "Sehr gerne, äh, komme ich …" got worse. So 0.6.0 ships 0.5.1's rule. ist, äh, um zehn keeps one comma too many again, as in every released version. A better rule needs its own attempt with these sentences (#30).

The other #31 fixes stay: German number words, the dot after a day (am 12. September) and fixed month/weekday lists (#22).

German footer

The new per-app rules footer said „Snippets“. Everywhere else the German UI says „Textbausteine“.

Checks

  • 58 tests, 0 failures, including a new testTidyKeepsTheCommaInFrontOfAFiller in place of testTidyDropsCommasThatOnlyFramedAFiller.
  • swiftlint --strict clean and check-localizations.py passes.
  • Website examples are unaffected: their fillers sit at the start of a sentence.
  • Windows has no tidy step, so TestData/text-pipeline.json is unchanged.

Refs #30, #31.

🤖 Generated with Claude Code

tobymarks and others added 2 commits October 29, 2026 17:21
Everywhere else the German interface calls them Textbausteine; the new
footer was the only place that said Snippets.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#30.1 dropped both commas around a filler so that "ist, äh, um zehn"
loses its stray comma. Most commas in front of a filler belong to the
sentence, though: "Ich glaube, äh, dass das stimmt" became "Ich glaube
dass das stimmt", and greetings, names, relative and infinitive clauses
lost theirs too. Found while checking the 0.6.0 release, before
anything was published.

A stress test of 528 realistic sentences with a filler between two
commas (German letters and chat, German speech, English) found the
right commas in 67 % with 0.5.1's rule, 42 % with #30.1 and 47 % with
word lists for the comma-needing cases on top. So 0.6.0 ships 0.5.1's
rule; a better one needs its own attempt with these sentences (#30).
The other #31 fixes stay: German number words, the dot after a day and
fixed month/weekday lists.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tobymarks
tobymarks merged commit 51da267 into main Oct 29, 2026
4 checks passed
@tobymarks tobymarks mentioned this pull request Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant