Skip to content

Swiss spelling by string transform, not by prompt - #184

Merged
trick77 merged 1 commit into
masterfrom
feat/swiss-spelling-transform
Sep 17, 2026
Merged

trick77 merged 1 commit into
masterfrom
feat/swiss-spelling-transform

Conversation

@trick77

@trick77 trick77 commented Sep 17, 2026

Copy link
Copy Markdown
Owner

The Swiss orthography prompt note is gone: measured useless on 2026-09-16, gpt-5.4 writes "größer" and "fuer" regardless of wording. German prose is now respelled by a string function on the way out (backend/internal/ask/swiss.go).

  • ß to ss always; ae/oe/ue to the umlaut, gated: ue after a/e/q/ä stays (neue, Steuer, Quelle), -uell suffix stays (aktuell) but Müller/befüllen get their ü, a word-final ue is English (Value, Continue), short stem list for names, borrowings and Latin -uen words.
  • Never touched: fences, inline spans, identifier-shaped words (camelCase, snake_case, digits, paths, dotted names), diagram node labels (known gap).
  • Stream: the renumberer gets a spell hook and holds a word back until its end arrives, so a token boundary inside "Gesch|aeft" still spells right and the reader sees exactly what is stored.
  • Title, card names and follow-ups run through the same function via spellFor(lang).
  • Eval: the digraphs column now reads Answer.Respelled (what the model wrote wrong), so the deployment's German spelling stays measurable; germanDigraphs in the eval is gone.
  • Known false-positive class accepted: compound seams (Kontoerstellung), names not on the list. On MiMo Pro the model writes 0 digraphs per run, on gpt-5.4 about 23.

Verified in the running app with a fake streaming upstream: "Der Gesch" + "aeftsprozess ist gr" + "ößer" arrived as "Der Geschäftsprozess ist grösser", pruefeGroesse and the fence body untouched, follow-up pill "Grösse der Strasse prüfen?", stored answer identical to the stream.

The Swiss orthography note asked the model for ss and umlauts and was
measured useless on 2026-09-16: gpt-5.4 writes "größer" and "fuer"
regardless of wording. The note is gone. German prose is now respelled
on the way out: ß to ss always, ae/oe/ue to the umlaut under a heuristic
(ue after a/e/q/ä, the -uell suffix, a word-final ue, a short stem list).
Fences, inline spans, identifier-shaped words and diagram labels are
never touched.

The stream goes through the renumberer's new spell hook, which holds a
word back until its end has arrived, so the reader and the record get
the same text. Title, card names and follow-ups run through the same
function. The eval's digraphs column now reads Answer.Respelled, the
words the model wrote wrong, so the number survives the correction.
@trick77
trick77 merged commit 295bd7f into master Sep 17, 2026
2 checks passed
@trick77
trick77 deleted the feat/swiss-spelling-transform branch September 17, 2026 16:33
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