Skip to content

feat: v7 weights, both orthographies and Cyrillic, with two word lists - #31

Merged
stephen-masters merged 2 commits into
mainfrom
feat/weights-v7
Nov 16, 2026
Merged

stephen-masters merged 2 commits into
mainfrom
feat/weights-v7

Conversation

@stephen-masters

Copy link
Copy Markdown
Contributor

Closes #19 (brief 014, Stage 5). Merging releases 0.12.0 to PyPI automatically and mirrors the v7 weights onto the GitHub Release.

What changes

  • Pins. WEIGHTS_VERSION = "v7"; weights and both word lists pinned at Hub commit 1d7b076caf (tag v7), each with its sha256. CLASSICAL_WORDLIST_URL/SHA256 are set for the first time, so wordlist() and reader(lexicon=True) decode with the union of the modern (130,762 words) and classical (1,055,306) lists.
  • The yaml is v7's: 246 classes against v6's 175, adding < > ³ ±, the Armenian apostrophe of elision ՚ and the Russian alphabet in both cases. It moves with the weights; v6's cannot read this head.
  • README: status for v7 with its known limits (five old registers slightly behind v6, Abovyan behind Calfa, bold-italic digits), the provenance paragraph for v7's pre-train from scratch and fine-tune, both lists under the two-list rule. NOTICE covers both lists and the two test crops.
  • Tests: tests/test_reads_v7.py loads the released weights and reads a classical crop (աւելի, Khrimian) and a Russian crop (короба, Tumanyan's apparatus); runs locally with the real easyocr, skips under CI's stand-in. The modern-only word-list fixture now clears the classical pins it used to assume absent.

The commit body carries the provenance and attribution the release notes need (git-cliff builds them from it).

Checks

  • 106 tests pass locally with easyocr, including the two live reads; the torch-free subset passes with the two skipped; ruff and uv lock --check clean.
  • tools/mirror_weights.py downloads the pinned URL and verifies the digest (15,299,339 bytes).
  • All three pinned files were downloaded from the Hub, re-hashed, and match the trainer's originals.

Commit type feat → 0.12.0. Tetrak then raises its [armenian] floor to 0.12 and regenerates the site's register table from v7's spans.

🤖 Generated with Claude Code

stephen-masters and others added 2 commits November 16, 2026 10:41
Brief 014, library issue #19. Pins tetrak/easyocr-armenian at Hub commit
1d7b076caf2555d3dd7ae56997877fc3b27d166b (tag v7): tetrak_hy.pth sha256
7b44dc0b81b11ca382a2faa4e4c27d2141da843a5653117a49506eaf5ca9d8fa,
wordlist.tsv.gz f53f0745bc3a792f7a3aa9cb4244c3c3f9d42834a359a5e7500d8dc7500e0f68
and, newly, wordlist-classical.tsv.gz
d71d57dd0a9667711a5602464ed47dd1e46ca5b0b088cb0f1cb4cb8bdd48e689, so
wordlist() now decodes with the union of the two lists. The packaged
yaml moves with the weights: 245 characters plus the blank, 246 classes
(v6: 175), adding < > ³ ±, the Armenian apostrophe of elision ՚ and the
Russian alphabet in both cases.

Provenance (full record in provenance.json beside the weights). v7 is a
pre-train from scratch by tetrak-hy-trainer on 175,500 synthetic line
crops rendered in fifteen Armenian faces from 60,000 lines sampled over
every proofread page of 58 works on Armenian Wikisource (CC BY-SA 3.0),
33 in classical orthography (a quarter of the lines), then a fine-tune
of 6,000 iterations on 217,362 real crops cut from 2,136 scans of 42
works (21,574 held out by page), mixed with the synthetic set, all-caps
lines and English lines from six public-domain novels. Every evaluation
page is excluded from all of it and from both lists. Held-out real-crop
accuracy 89.9%. Through Tetrak's pipeline, mean word recall over
seventeen held-out registers 0.892 against v6's 0.861, leading every
engine measured on fifteen; 61 of 81 Russian words on the Tumanyan pages
where v6 read none. Known defect, shipped knowingly: five of the eight
registers v6 was measured on are read slightly worse (by 0.003 to 0.018
word recall); v6 stays tagged on the Hub.

Attribution. The weights are trained on Armenian Wikisource text (CC
BY-SA 3.0). The word lists are derived from the same transcripts and the
classical one includes the Nayiri Armenian Lexicon, (c) Serouj
Ourishian, CC BY 4.0; both lists are CC BY-SA 4.0 (NOTICE).

Tests: a new module reads a classical crop (աւելի) and a Russian crop
(короба) with the released weights, locally; the modern-only fixture
clears the classical pins it used to assume absent. README and NOTICE
updated for v7 and the two lists.

Co-authored-by: Yvette Mankerian <yvettekm@gmail.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-authored-by: Yvette Mankerian <yvettekm@gmail.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@stephen-masters
stephen-masters merged commit d17834c into main Nov 16, 2026
3 checks passed
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.

Release the Armenian library with the v7 yaml and pins

1 participant