Skip to content

Releases

TrueGlyph 0.2.0: every language

Choose a tag to compare

@jishnucz jishnucz released this 02 Dec 14:02

Every language. 0.1.0 judged text only against the word lists of a few languages per script, so a clean page in Czech, Albanian, Belarusian or any of hundreds of other languages could be rated low (damaged). Measured on clean text in all 388 UDHR languages: 258 rated low in 0.1.0, 0 now.

  • 103 languages with word lists (63 bundled from Tesseract's dictionaries, 40 from wordfreq), found automatically by character-trigram language identification.
  • Languages without a word list are rated medium with unknown_language (checked by script rules), not called damaged. Legacy-font garble is still caught: real-PDF and synthetic benchmarks are unchanged, and the 628-page arXiv set has the same 4 flags as before.
  • --lang accepts all 110 languages TrueGlyph knows, plus forms such as pt-BR, no, tl.
  • New scripts: Syriac, Thaana (Dhivehi), Cherokee, Canadian syllabics (Inuktitut); Tibetan OCR.
  • OCR models download themselves: a model Tesseract lacks is fetched once from tessdata_best (TRUEGLYPH_NO_DOWNLOAD=1 to opt out).
  • Words keep their vowel marks (vowelled Arabic, pointed Hebrew, Thaana); Urdu hamza spellings unified; pages of names are not word-checked.
pip install -U "trueglyph[all]"

TrueGlyph 0.1.0

Choose a tag to compare

@jishnucz jishnucz released this 02 Dec 07:29

First release of TrueGlyph: know when the text you extracted from a PDF is wrong, in any script, and get the right text instead.

PDF extractors (pypdf, PyMuPDF, pdfminer, docling) silently return damaged text for Hindi, Bengali, Tamil, Thai, Khmer, Burmese, Arabic, Urdu, Hebrew, vertical Japanese and more; even English PDFs lose symbols and split words. TrueGlyph checks every page, repairs what it safely can, switches extractor or falls back to OCR, and gives each page a trust level (high / medium / low / none) so agents and RAG pipelines know what they may quote.

Install

pip install "trueglyph[all]"     # or install the wheel attached below
trueglyph demo

Claude Code / any MCP client: claude mcp add trueglyph -- uvx --from "trueglyph[all]" trueglyph-mcp
VS Code: install trueglyph-0.1.0.vsix below (Extensions view -> ... -> Install from VSIX).

Measured (reproducible with bench/)

  • 29 real UN PDFs in 29 languages: mean quality 0.782 vs 0.35 for every plain extractor; 80 of 84 damaged readings flagged without a reference.
  • 30 PDFs with known text, 24 scripts: 0.978 vs 0.875 for the best single extractor.
  • 628 pages of English arXiv papers: no false alarms; a clean 26-page paper is checked in under a second.

Word checks for ~57 languages (wordfreq + dictionaries from Tesseract's models, including Thai, Lao, Khmer and Burmese via segmentation). Limitations are listed honestly in the README.

Assets: Python wheel and source package (the same files will go to PyPI), VS Code extension.