Skip to content

comments: cut the development log from four more normalize layers - #685

Merged
christopherthompson81 merged 2 commits into
mainfrom
comment-sweep-3
Aug 7, 2026
Merged

comments: cut the development log from four more normalize layers#685
christopherthompson81 merged 2 commits into
mainfrom
comment-sweep-3

Conversation

@christopherthompson81

Copy link
Copy Markdown
Owner

Fifth batch of the comment sweep. Comments only; all four files are code-identical to main, verified by transpiling both revisions with removeComments and comparing the emitted code.

file comment lines total lines
serbian/normalize.ts 316 → 190 545 → 419
zulu/normalize.ts 314 → 171 437 → 294
persian/normalize.ts 293 → 157 410 → 274
english/normalize.ts 293 → 220 578 → 505

What went

Per CONTRIBUTING.md: corpus tabulations and defect inventories, decode transcripts and the arguments about how a word was sourced, chronology ("used to", "the first version", "an earlier draft of this comment"), and the inline trap-number glosses left over from the issue-reference strip.

What stayed

Marked with ⚠ where it bites — the ordering couplings between rules, the guards and what each rejects, deliberate omissions so they are not "fixed", and the per-language invariants:

  • Serbian — digraphia (every rule accepts both scripts, output is Latin), and the lowercase-licensor guard that is what preserves sentence-final periods.
  • Zulu — no rule may invent a concord for a noun it did not itself emit; the click letters make an unread letter worse than a missing one.
  • Persian — the tagger's alphabet is bare Perso-Arabic, so this layer may not emit harakat; RTL means currency/plus/ordinal move their word across the numeral.
  • English — does not use the shared symbol tier, so NOT_VERSION, magnitudes and bareExponent all need local equivalents.

English cuts least, and that is the honest result: much of its bulk is the unit and abbreviation tables plus the NOT_VERSION guard, which are specification rather than narrative.

Checks

  • npm run typecheck clean
  • 224 test files / 3114 tests passing
  • prettier: all four were already in the deferred repo-wide debt set on main; no new debt added

🤖 Generated with Claude Code

https://claude.ai/code/session_012Lc3WnUgogC7okV7n53vjr

christopherthompson81 and others added 2 commits August 6, 2026 18:12
Comments only — all four files verified code-identical to main by
transpiling both revisions with removeComments and comparing the emit.

  serbian   316 → 190    zulu     314 → 171
  persian   293 → 157    english  293 → 220

What went, per CONTRIBUTING: corpus tabulations and defect inventories,
decode transcripts and the arguments about how a word was sourced,
chronology ("used to", "the first version", "an earlier draft"), and the
inline trap-number glosses.

What stayed, marked with ⚠ where it bites: the ordering couplings between
rules, the guards and what each one rejects, deliberate omissions so they
are not "fixed", and the per-language invariants — Serbian's digraphia and
its lowercase-licensor guard, Zulu's rule that no rule may invent a concord
for a noun it did not emit, Persian's bare-Perso-Arabic emission constraint
and the RTL word-across-numeral move, English's lack of the shared tier.

English cuts least: much of its bulk is the unit/abbreviation tables and
the NOT_VERSION guard, which are specification rather than narrative.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012Lc3WnUgogC7okV7n53vjr
Self-review of the four rewrites. All three are cases where a paraphrase
invented or misattributed a reason; none touches code.

  serbian  the ± ordering note asserted a coupling to the degree rules'
           spacing that does not exist — the real reason ± runs first is
           that it is a single character the `+` arms cannot see
  english  said the ± arm requires the digit immediately; it does not,
           it has `\s?`. The no-space requirement belongs to the sign
           arm above it, which is what keeps `(1418 – 1450)` a range
  persian  listed the ordinal among the rules that move a word across
           the numeral; it replaces digits with words and moves nothing

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012Lc3WnUgogC7okV7n53vjr
@christopherthompson81
christopherthompson81 merged commit 8f612f7 into main Aug 7, 2026
2 checks passed
@christopherthompson81
christopherthompson81 deleted the comment-sweep-3 branch August 7, 2026 00:14
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