← all repositories
hezarai/hezar

Persian AI from OCR to speech, no assembly required

Because Persian AI shouldn't require gluing together a dozen repos, this library bundles NLP, vision, and speech models behind one task-based API.

1k stars Python Language ModelsDomain Apps
hezar
Not currently ranked — collecting fresh signals.
star history

What it does

Hezar is a Python library that gathers pretrained Persian AI models—spanning text classification, named-entity recognition, OCR, license-plate recognition, image captioning, and speech recognition—into one installable package. All assets are hosted on the Hugging Face Hub and cached locally after the first fetch, so subsequent use runs offline. It also packs word embeddings, datasets, tokenizers, and a training loop that can push fine-tuned models back to the Hub.

The interesting bit

Rather than scattering Persian BERT weights, Whisper forks, and CRNN checkpoints across a dozen repositories, Hezar exposes every task through a consistent Model.load() interface. That uniformity is the real product: it turns the Hub into a batteries-included Persian AI workstation where swapping from sentiment analysis to license-plate recognition is mostly a matter of changing a string argument.

Key highlights

  • Task coverage spans NLP, vision, audio, and embeddings with ready-made wrappers
  • Pretrained models include BERT-based sentiment/NER/POS taggers, Whisper-small for Farsi speech, CRNN for OCR and license plates, and a ViT-RoBERTa image-captioning pipeline
  • Ships with FastText and Word2Vec embeddings trained on Persian corpora
  • Caches downloads in ~/.cache/hezar, allowing fully offline reuse after the initial pull
  • Includes a Trainer class that handles fine-tuning and automatically uploads results to the Hub

Caveats

  • Python 3.10 or newer is mandatory; older runtimes need not apply
  • The README explicitly warns that mixed Persian numbers and characters in OCR output may not display correctly in the console
  • First use requires internet access to download models and datasets from Hugging Face Hub

Verdict

If you ship Persian-language features and are tired of gluing together disparate model repositories, this is your shortcut. If your stack never encounters Farsi text, speech, or imagery, you can safely keep scrolling.

Frequently asked

What is hezarai/hezar?
Because Persian AI shouldn't require gluing together a dozen repos, this library bundles NLP, vision, and speech models behind one task-based API.
Is hezar open source?
Yes — hezarai/hezar is open source, released under the Apache-2.0 license.
What language is hezar written in?
hezarai/hezar is primarily written in Python.
How popular is hezar?
hezarai/hezar has 1k stars on GitHub.
Where can I find hezar?
hezarai/hezar is on GitHub at https://github.com/hezarai/hezar.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.