Skip to content

comments: the l* sweep — an escaped comment, two duplicated blocks, and a misfiled doc - #706

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

comments: the l* sweep — an escaped comment, two duplicated blocks, and a misfiled doc#706
christopherthompson81 merged 2 commits into
mainfrom
sweep-l

Conversation

@christopherthompson81

Copy link
Copy Markdown
Owner

Continues the alphabetical comment sweep. 15 files across lao, latgalian, latin, latvian, lingala, lithuanian, luganda, lulesami, luo, luxembourgish.

Comment-only. Verified by transpiling both revisions with --removeComments and diffing the emitted JS: byte-identical across all 539 files in the closure. Typecheck clean, 3118 tests pass.

Real defects, not just tightening

  • luo.ts had a comment written in literal \u escapes⟨ng'⟩, → ASCII '. It renders as ⟨ng'⟩ … → ASCII ' in any tool that decodes escapes, which is why it survived every prior read of the file; it only shows up in the raw bytes.
  • lao.ts stated the ອ/ວ two-character lookahead rule twice, back to back, in two paragraphs whose examples had drifted apart.
  • lao.ts's SylF interface carried the doc comment for scan() — "Scan one reordered Lao word into rendered IPA syllables", a description of a function attached to a type.
  • lithuanian.ts and latvian.ts each had the inventory block duplicated: two adjacent doc comments making the same statement about NATIVE_CLASS.
  • luganda.ts read "ŋ were REMOVED" — singular subject, plural verb.

The standing standard

Dropped: chronology ("the fleet's 3rd Baltic language", "the FIRST Nilotic language in the repo"), referee corpus counts, decode transcripts of what the engine used to emit, and issue numbers. Kept: invariants, traps, ordering constraints, deliberate omissions.

Project-internal and 🔷 become where they mark a hazard and plain bullets where they were only section labels. l* was the first letter still carrying themak are clean, and 15 files from m onward still have them, which their letters will pick up.

luxembourgish/normalize.ts

The bulk of the diff. Its trap N references into docs/normalization_playbook.md carried ellipsis-truncated glossestrap 9 (a guard alternative with no attested…) — which read as broken text in the file where they appear. Each is replaced by the point it was making, so the file no longer depends on a numbering scheme in a process document to be legible.

The corpus counts there are kept only where they license a decision rather than merely record one:

  • the colon is never a clock in this language (every \d+:\d+ is a score or ratio, so no colon-clock rule is written);
  • a bare -N is a compound hyphen, not a negative number, which is why the minus rule keeps the German guard;
  • the number/unit separator is usually NBSP or narrow NBSP, so a rule keyed on a plain space matches almost nothing.

Note on a cross-cutting block

Seven files repo-wide share a NOT QUITE VERBATIM inventory block that carries four lines of history plus an anecdote about a Romanian word. I tightened the two in l*; aromanian, asturian, kabuverdianu, maltese and romanian still have the old wording and will converge as their letters come up — including a retro-pass over the three in already-swept letters.

christopherthompson81 and others added 2 commits August 6, 2026 21:51
…nd a misfiled doc (#706)

Continues the alphabetical comment sweep. 15 files across lao, latgalian,
latin, latvian, lingala, lithuanian, luganda, lulesami, luo, luxembourgish.
Comment-only: the emitted code is byte-identical with --removeComments.

Real defects, not just tightening:

  · luo.ts had a comment written in LITERAL \u ESCAPES — `⟨ng'⟩`,
    `→ ASCII '`. Invisible to any editor that renders escapes, so it
    survived every prior read of the file.
  · lao.ts stated the ອ/ວ two-char lookahead rule TWICE, back to back, in
    two paragraphs that had drifted apart in their examples.
  · lao.ts's SylF interface carried the doc comment for scan() ("Scan one
    reordered Lao word into rendered IPA syllables") — a doc describing a
    function, attached to a type.
  · lithuanian.ts and latvian.ts each had the inventory block duplicated:
    two adjacent doc comments saying the same thing about NATIVE_CLASS.
  · luganda.ts read "ŋ were REMOVED" — singular subject, plural verb.

The rest is the standing standard: drop chronology ("the fleet's 3rd Baltic
language", "the FIRST Nilotic language in the repo"), referee counts, decode
transcripts of what the engine used to emit, and issue numbers; keep the
invariants, the traps and the deliberate omissions. Project-internal ★ / 🔷
become ⚠ where they mark a hazard and plain bullets where they were only
section labels — l* was the first letter still carrying them.

luxembourgish/normalize.ts is the bulk of the diff. Its `trap N` references
into docs/normalization_playbook.md carried ELLIPSIS-TRUNCATED glosses —
"trap 9 (a guard alternative with no attested…)" — which read as broken text
in the file where they appear; each is replaced by the point it was making.
The corpus counts are kept only where they license a decision (the colon is
never a clock here; a bare -N is a compound hyphen, not a negative number).

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012Lc3WnUgogC7okV7n53vjr
Caught re-reading my own diff:

  · the lb copula note claimed *ass néngte beim Männer-Super-G* is "the same
    phrase" as `ass 15. beim Männer-Super-G`. It is the same FRAME with a
    different number (néngte is 9th, the digit is 15) — which is what makes
    it evidence, and calling it the same phrase overstates it.
  · "So does `Joer`" attached Joer to the wrong clause: Joer does not turn
    numerals into ordinals, it is EXCLUDED for the same reason the copula is.
  · ORDINAL_NOUN also carries Joerhonnerts and Joerdausend, not just
    Joerhonnert and the months.
  · step 1 said both grouping forms leave "a phrase break plus a spurious
    null". Only the PERIOD form does; the space form (`9 000` → *néng null*)
    has no period, so it leaves the spurious word alone.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012Lc3WnUgogC7okV7n53vjr
@christopherthompson81

Copy link
Copy Markdown
Owner Author

Review pass. Re-read my own diff and found four paraphrase errors, fixed in f305375:

  • the copula note claimed ass néngte beim Männer-Super-G is "the same phrase" as ass 15. beim Männer-Super-G. It is the same frame with a different number (néngte is 9th, the digit is 15) — which is exactly what makes it evidence for the ending. Calling it the same phrase overstates it.
  • "So does Joer" attached Joer to the wrong clause. Joer does not turn numerals into ordinals; it is excluded for the same reason the copula is.
  • ORDINAL_NOUN also carries Joerhonnerts and Joerdausend, which my shortened gloss dropped.
  • step 1 said both grouping forms leave "a phrase break plus a spurious null". Only the period form does — the space form (9 000néng null) has no period, so it leaves the spurious word alone.

Re-verified token-identical after the fixes. 3118 tests pass.


One code finding, deliberately not fixed here (this PR is comment-only): src/languages/lao/lao.ts:59 declares interface Syl and nothing uses it — scanFeatures returns SylF. It looks like the residue of the split into feature-records, and the misfiled SylF doc comment this PR fixed was part of the same seam. Worth a one-line deletion in a separate PR rather than smuggled into a diff whose whole guarantee is that the emitted code doesn't change.

Also verified rather than assumed: the Luganda note now asserts the g2p has no rule for ⟨ŋ⟩. ŋ does appear in luganda.jsonc — but only as an output value (the realisation of ng'), never as a grapheme key, so the claim holds.

@christopherthompson81
christopherthompson81 merged commit 39cfca1 into main Aug 7, 2026
2 checks passed
@christopherthompson81
christopherthompson81 deleted the sweep-l branch August 7, 2026 03:54
christopherthompson81 added a commit that referenced this pull request Aug 7, 2026
)

* lao: drop the unused `Syl` interface left behind by the SylF split

`interface Syl` had exactly one reference in the repo — its own declaration.
It is the pre-split shape of a syllable record; `scanFeatures` returns `SylF`,
which carries the same fields plus `heavy` and drops `coda`/`glide` in favour
of the merged `codaOut`. Nothing ever constructed a `Syl`.

Found while sweeping comments in #706: the doc comment for `scan()` had been
left attached to `SylF`, and this dead interface is the other half of that
same seam. It was kept out of #706 because that PR's guarantee was that the
emitted code did not change.

Korean has its own unrelated `Syl` in korean/g2p.ts, which IS used. Neither
is exported, so the two never interact.

Behaviour spot-checked against the examples the surrounding comments cite —
ຄົນອັງກິດ→kʰon.ʔaŋ.kit, ກັງວານ→kaŋ.ʋaːn, ກອນ→kɔːn, ຂະບວນ→kʰa.buːən — all
unchanged.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012Lc3WnUgogC7okV7n53vjr

* lao: carry the field glosses onto SylF rather than losing them with Syl

The deleted `Syl` was the only place these fields were documented; `SylF` was
a bare one-liner. Moving the glosses across keeps the deletion from being a
net documentation loss, and lets the one genuinely surprising field say so:

`heavy` is NOT `long`. A centring diphthong (uːə/iːə/ɯːə) carries its ː inside
`quality` and sets long:false so scan() does not append a second one — but it
still counts as a heavy syllable for tone. Verified: ຄວາຍ → kʰuːəj, one length
mark, live-syllable tone.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012Lc3WnUgogC7okV7n53vjr

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
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