Repository navigation
feat(lexicon): decode against the modern and classical lists together - #29
Merged
Merged
Conversation
Brief 014, Stage 3 (issue #18). A list built from reformed text alone calls every classical spelling a misread (նոյն is not in it, նույն is) and corrects a classical page into the other orthography one word at a time. Two lists are now released side by side and the decoder works on their union: a word in either list is accepted as written and never rewritten into the other's, and a word in neither is corrected to the most probable listed reading, whichever list holds it. `load_wordlists(*paths)` is the union; `wordlist()` returns the union of the released lists and `classical_wordlist_path()` the second file, pinned by `CLASSICAL_WORDLIST_URL` and `CLASSICAL_WORDLIST_SHA256` as the modern one is. Both are None until the trainer publishes the list (trainer #48), and the modern list is used alone until then, so this release changes nothing for a current reader. Tests: a classical spelling is never rewritten to its reformed form and the reverse, on hand-built matrices where the other spelling is the runner-up; a single list does rewrite it, which is the over-correction the pair prevents; a misread in neither list is still corrected. The pins are checked set together, the union loaded and cached, a tampered classical download refused. τ re-checked on v7's 21,574 held-out crops with the union: 5 is again the peak (exact-match 0.900 to 0.916, 393 fixed for 46 broken); the modern list alone loses 19 crops net on classical pages, the union gains 223 there and 124 on reformed pages. Co-authored-by: Yvette Mankerian <yvettekm@gmail.com> Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
4 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #18.
What
lexicon.load_wordlists(*paths): the union of several lists.tetrak_hy.wordlist()returns the union of the released modern and classical lists;classical_wordlist_path()fetches the second file, pinned byCLASSICAL_WORDLIST_URL/CLASSICAL_WORDLIST_SHA256exactly as the modern one is. Both pins areNoneuntil the trainer publishes the list (tetrak-hy-trainer #48), and the modern list is used alone until then, so nothing changes for a currentreader(lexicon=True).Tests
TestTwoOrthographieson hand-built matrices for նոյն / նույն, where the other spelling is the runner-up: a classical spelling is never rewritten to its reformed form and the reverse; a single list does rewrite it (the over-correction the pair prevents); a misread in neither list is still corrected.test_wordlist.py: pins set together, union loaded and cached, a tampered classical download refused. 89 pass.τ re-checked on v7 (brief 014)
21,574
real_valcrops held out from v7's training, both lists rebuilt without those crops' pages (build_wordlist.py --exclude-crops), the n-best captured once and the rule scored offline.τ = 5 stays. By the orthography of the crops' source harvests at τ = 5: the modern list alone is −19 net on the 8,547 classical crops (178 fixed, 197 broken) and +127 on the 13,027 reformed; the union is +223 on classical and +124 on reformed, so each page keeps nearly all of its own list's gain and the other list costs it almost nothing. Full table in the trainer under
runs/v7-b014/tau/.A
feat, so a minor release; the pins for the classical list follow with the v7 weights release (#19).🤖 Generated with Claude Code