Repository navigation
Description
Problem
Friday has no simplified/traditional normalization layer, so whatever script the
model emits goes straight into your text. In practice, long Chinese narration
comes back mostly simplified with a small number of traditional characters mixed
in — a handful of characters across the 19 long samples in the v0.4.0
evaluation. It is not enough to break anything, and it is enough to look wrong
in a document that is otherwise simplified.
Details and per-sample numbers are in
docs/language-detection-findings-2026-08.md.
Rough scope
A normalization pass in post-processing that converts Chinese output to a single
target script:
- A setting for the target: simplified, traditional, or off. Off should stay
available — someone dictating in Taiwan or Hong Kong wants the opposite of
what I want, and someone quoting a traditional text wants neither. - Character-level mapping is the cheap version and gets most of the residue.
Phrase-level conversion (the 软件/軟體 class of differences) is a much larger
problem and is explicitly not in scope here. - No new runtime dependency if avoidable. A bundled mapping table is preferable
to pulling in a conversion library, but if the table gets unreasonable, say so
in the PR and we can discuss it.
Pointers
Sources/FridayMac/Services/PostProcessService.swift— the cleanup pipeline;
this pass would slot in with the other normalizations. Ordering matters: it
should run before rules that match literal Chinese strings, or those rules
need both scripts.Sources/FridayMac/Utils/CJKScript.swift— existing CJK character detection
helpers, including the ranges to scan.Sources/FridayMac/Services/TranscriptionService.swift— the trailing-
hallucination strippers already handle both scripts by listing both forms; a
normalization pass could eventually simplify that, but do not couple the two
changes in one PR.Tests/FridayMacTests/PostProcessServiceTests.swift,
Tests/FridayMacTests/CJKScriptTests.swift.
What a first contribution could look like
Traditional-to-simplified only, character-level, behind a setting that defaults
to off, with tests covering: pure simplified text unchanged, mixed text
normalized, and text that is deliberately all-traditional left alone when the
setting is off. That is a complete, reviewable PR on its own.
Honest unknowns
- Whether "off" or "simplified" is the right default. Off is safer; simplified
is what most current users appear to want. I would take a PR with either as
long as it is stated. - Some characters are genuinely ambiguous in one direction (several traditional
forms map to one simplified form and back again incorrectly). A one-directional
traditional→simplified table avoids most of this; the reverse direction is
harder and can be deferred. - I have not measured whether residue also appears in short dictation, only in
long narration. If you find a cheap way to check, that is useful on its own.
Activity