tetrak-easyocr-armenian
Armenian language support for EasyOCR — a trained recognition model, installable as a custom network.
Status: pre-release. The packaging and loading path are complete and tested; the first trained weights have not shipped yet. Until they do,
reader()raises a clear error unless you pass your ownweights_path=. Watch the releases.
Usage
pip install tetrak-easyocr-armenian
import tetrak_hy
reader = tetrak_hy.reader() # an easyocr.Reader, Armenian-ready
results = reader.readtext("scan.png")
reader() accepts everything easyocr.Reader does (gpu=, verbose=,
…) and handles the custom-network plumbing: the network config and weights
are materialised into ~/.tetrak_hy/ on first use, and the quirks of
EasyOCR's custom-model loading path (there are a few) stay our problem
rather than yours.
Cached weights are verified against the release's SHA-256 every time they are loaded, not only when they are downloaded. A file that matches is used as it is — so a machine with no outbound access works once the weights are in place — and one that does not, because it was corrupted or because you have upgraded to a release carrying a new model, is replaced by a fresh verified download.
Set TETRAK_HY_HOME to put the cache somewhere other than your home
directory, or choose it per call:
reader = tetrak_hy.reader(cache_dir="/srv/models/tetrak_hy")
A local .pth passed as weights_path= is kept in a local/
subdirectory of the cache, so testing your own weights does not disturb
the released ones.
What it is
EasyOCR does not ship Armenian. This package adds it as a custom recognition network: EasyOCR's own generation2 architecture (VGG + BiLSTM + CTC), trained for the Armenian script — the full alphabet, the և ligature, Armenian punctuation (՝ ՛ ՞ ՜ ։ ֊ « »), digits and basic Latin for mixed material. Detection is untouched: EasyOCR's CRAFT detector already finds Armenian text; reading it is what was missing.
The import name tetrak_hy is also the EasyOCR network name — EasyOCR
imports this package directly as the model architecture. If you prefer to
wire the Reader yourself:
import easyocr
reader = easyocr.Reader(
["en"], # see note below
recog_network="tetrak_hy",
user_network_directory="~/.tetrak_hy",
model_storage_directory="~/.tetrak_hy",
)
(["en"], not ["hy"]: EasyOCR looks up a per-language character file it
does not have for Armenian. The setting is decorative for custom models —
the model's own character list governs decoding — and reader() hides
this entirely.)
Provenance
The model is trained by tetrak-hy-trainer — synthetic Armenian text rendered in period fonts, fine-tuned on human-proofread scans of the Armenian Soviet Encyclopedia from Armenian Wikisource (CC BY-SA 3.0). Every weights release carries its provenance record: data recipe, fonts, crop counts, training config and checksums.
Built for Tetrak, a local-first transcription
pipeline for archival material, which consumes this package as its
easyocr-hy backend — but nothing here depends on Tetrak.
Licence
Apache License 2.0 — see LICENSE and NOTICE. The architecture re-exported here is EasyOCR's (Apache 2.0).
Development
python3 -m venv .venv && source .venv/bin/activate
pip install -e '.[dev]'
pytest
ruff check src tests && ruff format --check src tests
Commits follow Conventional Commits,
enforced by the hook in .githooks/ (git config core.hooksPath .githooks
after cloning, or lefthook install). Releases and CHANGELOG.md are
generated from those commits automatically on every push to main.
See CONTRIBUTING.md for the full workflow — checks, the dependency lockfile, and what the automation expects — and SECURITY.md for how to report a vulnerability.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tetrak_easyocr_armenian-0.2.0.tar.gz.
File metadata
- Download URL: tetrak_easyocr_armenian-0.2.0.tar.gz
- Upload date:
- Size: 163.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dec87a749d112cd652e629f71d0e72ab5874155b5034805a9d7ca66f7cffd3ba
|
|
| MD5 |
f3eaab61b6c1aab992c2a88b4475f25d
|
|
| BLAKE2b-256 |
7767c514d7ec18eb4b506048916706b19628f71a4ad6679d078886d4f381ce51
|
Provenance
The following attestation bundles were made for tetrak_easyocr_armenian-0.2.0.tar.gz:
Publisher:
release.yml on scattercode/tetrak-easyocr-armenian
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tetrak_easyocr_armenian-0.2.0.tar.gz -
Subject digest:
dec87a749d112cd652e629f71d0e72ab5874155b5034805a9d7ca66f7cffd3ba - Sigstore transparency entry: 2655164953
- Sigstore integration time:
-
Permalink:
scattercode/tetrak-easyocr-armenian@d1083b3e5a2a3769b6c72ba9af25cb33b383623c -
Branch / Tag:
refs/heads/main - Owner: https://github.com/scattercode
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@d1083b3e5a2a3769b6c72ba9af25cb33b383623c -
Trigger Event:
push
-
Statement type:
File details
Details for the file tetrak_easyocr_armenian-0.2.0-py3-none-any.whl.
File metadata
- Download URL: tetrak_easyocr_armenian-0.2.0-py3-none-any.whl
- Upload date:
- Size: 13.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b6fa08afaf07e93a670bd4956f94bfccf85295fb920077720495ed07cb9c3a6e
|
|
| MD5 |
e6d5d584e607e188f57c3bee8bdb1eaf
|
|
| BLAKE2b-256 |
92e153b9b1ed43ee36c0034642f2fda885f9b6e53da291b3ace90a7402b9d88b
|
Provenance
The following attestation bundles were made for tetrak_easyocr_armenian-0.2.0-py3-none-any.whl:
Publisher:
release.yml on scattercode/tetrak-easyocr-armenian
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tetrak_easyocr_armenian-0.2.0-py3-none-any.whl -
Subject digest:
b6fa08afaf07e93a670bd4956f94bfccf85295fb920077720495ed07cb9c3a6e - Sigstore transparency entry: 2655164965
- Sigstore integration time:
-
Permalink:
scattercode/tetrak-easyocr-armenian@d1083b3e5a2a3769b6c72ba9af25cb33b383623c -
Branch / Tag:
refs/heads/main - Owner: https://github.com/scattercode
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@d1083b3e5a2a3769b6c72ba9af25cb33b383623c -
Trigger Event:
push
-
Statement type: