Repository navigation
feat(accuracy): score the two-letter եւ and the ligature և as one - #10
Merged
Merged
Conversation
Brief 014, decided 2026-10-08. Classical-orthography presses split 21 to 16 on which form they set and reformed presses set the ligature, so an engine that emits one where the transcript has the other has not misread anything. Ground truth stays as printed; the metric folds եւ to և after lowercasing. The trainer's copy of this module carries the same change. Co-authored-by: Yvette Mankerian <yvettekm@gmail.com> Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Deploying tetrak with
|
| Latest commit: |
d284edf
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://b2be605f.tetrak.pages.dev |
| Branch Preview URL: | https://feat-ew-ligature-metric.tetrak.pages.dev |
There was a problem hiding this comment.
🟢 Approval recommended
The implementation is focused, correctly ordered, tested, and synchronized with the trainer change.
0 open findings
What changed in this PR
Updates OCR scoring to treat Armenian եւ and և as equivalent while preserving printed ground truth.
Changes:
- Normalizes the two-letter form to the ligature after lowercasing.
- Tests lowercase and capitalized forms.
| File | Description |
|---|---|
src/tetrak_ocr/accuracy.py |
Adds the Armenian equivalence normalization. |
tests/ocr/test_accuracy.py |
Verifies normalization and word recall. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
Why
Brief 014 Stage 0.3, decided 2026-10-08: classical-orthography presses split 21 to 16 on whether they set
եւas two sorts or theևligature, reformed presses set the ligature, and transcribers follow the page or do not. An engine that emits one form where the transcript has the other has not misread anything, so the metric should not rank engines on it. Ground truth stays as printed.What changes
tetrak_ocr.accuracy.normalisefoldsեւtoևafter lowercasing (soԵւandԵՒfold too). One test. The trainer's deliberate copy of this module carries the identical change in scattercode/tetrak-hy-trainer#30, as the two must move together.Effect
Re-scored every saved reading across the seventeen Armenian evaluation sets: no leader changes on any register; character similarity moves by at most 0.002, word recall by at most 0.016 (plain Tesseract on Հայկական տպագրութիւն, which emits the ligature where the page sets two sorts).
registers.csvis not regenerated here: the eight published rows move by under 0.002, and the nine new classical registers join it at brief 014's publish stage.Test plan
pytest tests/ocr/test_accuracy.py tests/test_register_comparison.py: 35 passed🤖 Generated with Claude Code