Hazm is live · free · last verified 26 Oct 2026 · viability monitor

Hazm

Hazm

Hazm is an open-source Python library for Persian NLP: normalization, tokenization, tagging and dependency parsing.

58/100MonitorFreeFree

For Persian-only NLP in Python, Hazm is the most direct path from raw text to tagged, parsed output and it costs nothing. Hugging Face Hub loading (repo_id plus model_filename) means you don't hand-manage model files, and passing a local path covers air-gapped deployments; documented repos include hazm-postagger, hazm-chunker, hazm-dependency-parser, hazm-word-embedding and hazm-sent-embedding. The API is deliberately one-class-per-task, which makes it easy to read and easy to unit test. Pick it for Persian research, prototypes and language features in a product. If you need one pipeline spanning twenty languages, weigh spaCy with a Persian model or Stanza instead — Hazm will not do that

Verdict generated

Verified 5d ago · liveness 58/100 · cite: rightaichoice.com/tools/hazm

Best for
  • Computational linguists and researchers working on Persian corpora
  • Python developers adding Persian text cleaning and tokenization to an app
  • Students learning Persian NLP who want a readable, task-by-task API
  • Data scientists preprocessing Persian datasets for classification or search
Not ideal for
  • Processing English, Arabic or other non-Persian text
  • Teams that want a hosted NLP API instead of a self-managed library
  • Anyone needing a graphical interface rather than Python code
Visit Website

IntermediatePython developer: pip install hazm takes under a minute, and normalization/tokenization work immediately. Allow 10–30 minutes for the first POS-tagging run if you let POSTagger pull pos_tagger.model from the Hugging Face Hub, since the download is cached locally. Analyst or researcher without Python packaging experience: budget an afternoon for a virtualenv, the package install and a firstNo public APIVerified 5d ago
Pricing
Free
FreeFree tier
Learning curve
Intermediate
Python developer: pip install hazm takes under a minute, and normalization/tokenization work immediately. Allow 10–30 minutes for the first POS-tagging run if you let POSTagger pull pos_tagger.model from the Hugging Face Hub, since the download is cached locally. Analyst or researcher without Python packaging experience: budget an afternoon for a virtualenv, the package install and a first
Who it's for
Python developer adding Persian search to an appComputational linguist studying Persian syntax
Live sentiment
Is Hazm actually worth it?

We scan live Reddit threads, YouTube comments, X posts, G2 reviews and other communities — and hand you an honest verdict in under a minute.

  • Honest verdict, not marketing
  • Real pros & cons from real users
  • Attributed quotes with receipts
Run a free scan

3 free scans · no card needed

Skip it if

Skip Hazm if your text is not Persian, or if you want a hosted NLP endpoint with a UI rather than a Python library you install, cache models for and run inside your own environment.

Skip-it-if note generated
The 30-second take
Price reality

Hazm costs $0 — it is open source under the Roshan AI team, so there is no tier, seat or usage meter to budget for. Your real cost is engineering time: staging Persian model files from the Hugging Face Hub, caching them on disk, and running the library inside your own Python environment. That is cheaper than any commercial Persian NLP API on a per-volume basis, but it only pays off if you already have Python engineers on staff.

Generated

In short

Hazm — Hazm is an open-source Python library for Persian NLP: normalization, tokenization, tagging and dependency parsing. Best for Computational linguists and researchers working on Persian corpora, Python developers adding Persian text cleaning and tokenization to an app, Students learning Persian NLP who want a readable, task-by-task API. Free to use.

What is Hazm?

Hazm — Hazm is an open-source Python library for Persian NLP: normalization, tokenization, tagging and dependency parsing. Best for Computational linguists and researchers working on Persian corpora, Python developers adding Persian text cleaning and tokenization to an app, Students learning Persian NLP who want a readable, task-by-task API. Free to use.

FreeIntermediateNo API

Hazm is a free, open-source Python library built specifically for processing Persian text. It sits on top of NLTK and bundles the core pipeline Persian actually needs: text normalization (fixing Arabic characters, kashida and half-space problems), sentence and word tokenization, stemming, lemmatization, part-of-speech tagging, chunking, syntactic dependency parsing, and word and sentence embedding loading. Install is a single command — pip install hazm — and it is maintained by the Roshan AI team, compatible with Python 3.12+. Pretrained models are the part most teams underestimate. Hazm integrates directly with the Hugging Face Hub: you pass a repo_id and model_filename and the library downloads and caches the model locally, so later runs are fast. Documented examples in the docs include roshan-research/hazm-postagger with pos_tagger.model for POS tagging, roshan-research/hazm-chunker with chunker.model for chunking, roshan-research/hazm-dependency-parser with langModel.mco for dependency graphs, plus roshan-research/hazm-word-embedding (fasttext_skipgram_300.bin, loaded with model_type='fasttext') and roshan-research/hazm-sent-embedding (sent2vec-naab.model). For air-gapped or offline work you download the same files and hand the local path to the constructor instead. In practice: Normalizer().normalize() cleans messy Persian orthography, SentenceTokenizer and WordTokenizer split it, POSTagger tags each word (the docs show ('ما', 'PRON'), ('کتاب', 'NOUN'), ('می‌خوانیم', 'VERB')), then Chunker emits NP and VP spans or DependencyParser builds a graph with head, rel, lemma and ctag per token. The embedding classes compute sentence similarity or call doesnt_match to find the odd word out without leaving the library. It is deliberately single-language: if your text is English, Chinese or Arabic, this is not your tool.

Key features

  • Persian text normalization for Arabic characters, kashida and half-space errors
  • Sentence tokenization for Persian text
  • Word tokenization for Persian text
  • Persian stemming
  • Persian lemmatization
  • Part-of-speech tagging for Persian words
  • Chunking into NP and VP phrase spans
  • Syntactic dependency parsing with per-token head, rel, lemma and ctag output
  • Word embedding loading via fastText skip-gram vectors
  • Sentence embedding loading via sent2vec models
  • Automatic pretrained model download and caching from the Hugging Face Hub
  • Manual model loading from a local file path for offline use
  • Installable with pip (pip install hazm)
  • Python 3.12+ compatibility
  • Corpus readers for Persian corpora

Behind the verdict

Hazm's value is focus. Rather than a general NLP framework with a Persian plugin bolted on, it ships the ten or so classes that Persian text actually requires, and each one does one job. Normalizer fixes the orthography problems that break naive pipelines — Arabic yeh and kaf variants, kashida stretching, and half-space (ZWNJ) errors — so downstream tokenization isn't working on corrupted input. SentenceTokenizer and WordTokenizer return plain Python lists you can print and inspect, and the docs' Quick Start shows exactly that: normalizing 'من کتاب های زیــــادی دارم .' to 'من کتاب‌های زیادی دارم.' Where it gets more interesting is the model layer. POSTagger, Chunker and DependencyParser all take a repo_id and model_filename and pull weights from the Hugging Face Hub, caching them on first download; swapping in model='path/to/pos_tagger.model' gives you the same object working fully offline. The dependency parser output is a per-token dict with address, word, lemma, ctag, head, rel and a deps map, which is enough structure to build relation extraction or grammar-aware search on top of. Embeddings are handled at two levels — WordEmbedding for fastText skip-gram vectors (the docs' doesnt_match example returns 'پنجره' out of کتاب/دفتر/قلم/پنجره) and SentEmbedding for sent2vec sentence similarity. Weaknesses are structural, not accidental. It is Persian only; feeding it Arabic or English is the wrong use of the library. Advanced tasks need the pretrained models — normalization, tokenization, stemming and lemmatization work without them, but tagging, chunking and parsing do not. There is no service, no UI and no managed runtime: you own model caching, disk and the execution environment, and you'll need enough engineering capacity to stage model files if you deploy somewhere without outbound access. The docs also point to a Corpus Readers section and a Ports in Other Languages section, so if you'd rather work in another language there is a documented port path. For a research group or a Python team with a Persian-language feature, that trade is a good one: a small dependency footprint, permissive open source, and an API you can hold in your head.

Models under the hood

roshan-research/hazm-postaggerroshan-research/hazm-chunkerroshan-research/hazm-dependency-parserroshan-research/hazm-word-embedding (fasttext_skipgram_300.bin)roshan-research/hazm-sent-embedding (sent2vec-naab.model)

as of 2026-10-30

Limitations

  • Hazm is a Python library for Persian NLP, and it needs pretrained models for advanced tasks such as POS tagging, chunking and dependency parsing; the normalization, tokenization, stemming and lemmatization classes run without them.
  • It is compatible with Python 3.12+ and maintained by the Roshan AI team.
  • Models load either automatically from the Hugging Face Hub via repo_id and model_filename, or manually from a local file path for offline use.
  • It handles Persian only — feeding it English, Arabic or Chinese is the wrong use of the tool, and there is no single multilingual model here.
  • It is a library rather than a service, so there is no graphical interface and your team owns model caching, disk use and the runtime environment.
  • It also does not cover the full pipeline on its own: the docs point to separate Corpus Readers and Ports in Other Languages sections for those needs.

as of 2026-10-15

Researching Hazm? Get your full AI stack in 60 seconds.

Free, no signup — tell us your goal and get tools matched to your budget & existing stack.

Is Hazm still active?

Hazm is live · free · last verified 26 Oct 2026 · viability monitor.

Viability score

58/100
Monitor

How well maintained and how widely used is Hazm? Built from what the vendor actually publishes (docs, changelog, tutorials, integrations, pricing), whether the site is live, and how much real users discuss it. How we calculate this

Recent activity
90
Traction
100
Site health
95
User sentiment
6
What the vendor publishes
0

Last calculated: October 2026

How we score →

What do users say about Hazm?

What people actually say about Hazm — is it worth it?

We scanned public community sources for Hazm on Aug 26, 2026 and could not establish that the discussion we found is about this tool rather than something else sharing its name. Our own analysis of that scan says the posts were off-subject. Rather than publish a sentiment score built on the wrong subject, we publish nothing here and re-run the scan.

How we verified this

Every listed fact about Hazm— pricing, features, links, status — is re-read from the vendor's own pages by our verification pipeline and each change is logged with a date; the last pass ran on 26 Oct 2026. Pages mix model-assisted synthesis with human review; see how we verify.

Verification history

We have re-verified Hazm 11 times since . Each pass re-reads the vendor's own pages and re-checks every listed field against that evidence; passes where nothing had changed are marked as such.

  1. — changed pricing tiers, summary, limitations, use cases, description, switching in, features, pricing fit, switching out, our verdict, who should skip it, setup time, hidden costs
  2. — changed SSL certificate, use cases, setup time, pricing fit, our verdict, features, description, summary, hidden costs, limitations, switching in, who should skip it, switching out, models
  3. — changed who it suits, description, our verdict, features, who should skip it, pricing tiers, summary
  4. — changed limitations
  5. — changed pricing page
  6. — changed setup time, switching out, switching in, who should skip it, hidden costs, features, use cases, summary, our verdict, who it suits, pricing fit, pricing tiers

Showing the 6 most recent of 11 verification passes.

Free to cite with attribution — this page re-verifies continuously.

How much does Hazm cost in 2026?

Hazm: Free to use. Pricing last verified 26 Oct 2026.

Plans compared

Every published Hazm tier, its price as the vendor publishes it, who it fits, and what it adds over the tier below. The 12-month cost projection follows.

Hazm pricing plans compared
PlanPriceBillingWho it's for
Open SourceFree—Persian NLP researchers, students and Python teams who want a free library they run and host themselves, with no usage meter.Adds: Starting tier — the full library at $0, installed with pip install hazm, including normalization, tokenization, tagging, chunking, dependency parsing and embedding loading.

12-month cost

Project the real annual outlay, including the implied monthly cost when only an annual tier is published.

Annual total
Free
Over 12 months
Effective monthly
—
—

Vendor list price only. Add-on usage, seat overages, and contract minimums are surfaced under Hidden costs & gotchas.

Where the pricing makes sense

The company stage and team size where Hazm's pricing actually pencils out — and where peers do it cheaper.

Hazm costs $0 — it is open source under the Roshan AI team, so there is no tier, seat or usage meter to budget for. Your real cost is engineering time: staging Persian model files from the Hugging Face Hub, caching them on disk, and running the library inside your own Python environment. That is cheaper than any commercial Persian NLP API on a per-volume basis, but it only pays off if you already have Python engineers on staff.

Hidden-cost and price-fit notes generated

Has Hazm's pricing changed?

No plan price for Hazm has moved since we began logging in Aug 2026; the pricing page is re-read on every verification pass.

Who should pick Hazm?

Pick Hazm if you are Computational linguists and researchers working on Persian corpora, Python developers adding Persian text cleaning and tokenization to an app, Students learning Persian NLP who want a readable, task-by-task API, Data scientists preprocessing Persian datasets for classification or search.

Look elsewhere if you are Processing English, Arabic or other non-Persian text, Teams that want a hosted NLP API instead of a self-managed library, Anyone needing a graphical interface rather than Python code, Projects without the engineering capacity to cache and host model files.

Skip it if Skip Hazm if your text is not Persian, or if you want a hosted NLP endpoint with a UI rather than a Python library you install, cache models for and run inside your own environment.

Generated

Real-world workflow fit

Concrete scenarios for the personas Hazm actually fits — and what changes day-one when you adopt it.

Python developer adding Persian search to an app

Normalize scraped Persian user-generated text with Normalizer().normalize() to fix Arabic character variants and half-space errors, split it with WordTokenizer and SentenceTokenizer, then lemmatize each token so 'می‌نویسیم' and 'نوشت' collapse to the same index term.

Outcome: A consistent index over Persian text that doesn't split the same word into three spellings, built with pip install hazm and no external service.

Computational linguist studying Persian syntax

Tag sentences with POSTagger(repo_id='roshan-research/hazm-postagger', model_filename='pos_tagger.model'), feed the tagged output into Chunker for NP/VP spans and DependencyParser (roshan-research/hazm-dependency-parser, langModel.mco) for a graph of head, rel and lemma per token.

Outcome: Structured syntactic annotations per sentence that you can count, compare or export, all reproducible from documented model repos.

Workflow scenarios generated

Use cases

  • Normalize and clean Persian text from user input or web scraping before any downstream step
  • Tokenize Persian texts into sentences and words for further analysis
  • Tag parts of speech to identify grammatical roles in Persian sentences
  • Stem or lemmatize Persian words to reduce inflectional forms to base forms
  • Extract noun phrases and verb phrases from Persian text using chunking
  • Parse syntactic dependencies in Persian sentences for deeper linguistic analysis
  • Load pretrained word and sentence embeddings for similarity tasks
  • Preprocess Persian datasets for classification, search indexing or corpus research

Setup time & first value

How long it actually takes to get something useful out of Hazm — broken out by persona, not the marketing-page minute.

Python developer: pip install hazm takes under a minute, and normalization/tokenization work immediately. Allow 10–30 minutes for the first POS-tagging run if you let POSTagger pull pos_tagger.model from the Hugging Face Hub, since the download is cached locally. Analyst or researcher without Python packaging experience: budget an afternoon for a virtualenv, the package install and a first

Switching to or from Hazm

How to bring data in from common predecessors and how to get it back out — written for the switcher, not the buyer.

Migrating in
  • →From hand-rolled regex Persian cleaning: replace the ad-hoc character maps with Normalizer().normalize(), which handles Arabic yeh/kaf variants, kashida and half-space issues in one call.
  • →From NLTK on Persian text: keep NLTK installed (Hazm builds on it) and add Hazm's Normalizer, WordTokenizer and Lemmatizer, which are tuned to Persian orthography rather than whitespace rules.
  • →From a commercial Persian NLP API: swap each endpoint for the matching Hazm class (tagging, chunking, parsing, embeddings) and pass local model paths so inference no longer leaves your environment.
Migrating out
  • ↗To spaCy with a Persian model or Stanza: port your pipeline stages to the spaCy pipeline object when you need one interface across several languages instead of a Persian-only library.
  • ↗To a hosted multilingual NLP API: hand off the modelling when your team no longer wants to stage model files and own the runtime.
  • ↗To another Python NLP library via ports: the Hazm docs list a Ports in Other Languages section if your production stack isn't Python; the sibling port keeps the same task split.

Integrations

Hugging Face HubNLTK

Tutorials & Learning

YouTube returned 6 videos for “Hazm”, and we withheld 6: 6 could not be judged, because “Hazm” is a single word that other videos use for other things. We are showing none, because we could not prove any of them are about Hazm.

Official links

What are the best Hazm alternatives?

The closest alternatives to Hazm we list are Nltk, SpaCy and Compromise. Ranked by direct product-type match, not category overlap.

Closest alternatives to Hazm
AlternativePricingStarts atLast verified
NltkFreeFree—
SpaCyFreemiumPricing not published—
CompromiseFreeFree—

Alternatives to Hazm

View all
Nltk

Nltk

NLTK is the free Python library for tokenization, POS tagging, parsing, and 50+ linguistic corpora.

FreeTry
SpaCy

SpaCy

spaCy is the open-source Python NLP library for fast, production-grade text processing and information extraction at scale.

FreemiumTry
Compromise

Compromise

Compromise is a zero-dependency JavaScript NLP library for offline POS tagging, named entity recognition, and verb conjugation in English

FreeTry

Tools that pair well with Hazm

Common stack mates teams adopt alongside Hazm, with the specific reason each pairing earns its keep.

Hazm vs its closest rival

Hazm's closest head-to-head is with Surge Ai — Choose Hazm if you need a free, open-source Persian NLP library for research or application development. Choose Surge AI if you need expert human feedback for training or evaluating frontier AI models, especially on complex reasoning tasks. They serve entirely different purposes—Hazm is a tool for processing Persian text programmatically, while Surge AI is a platform for human-in-the-loop alignment of state-of-the-art AI systems. Verdict generated

Head-to-head comparisons

Frequently asked questions

Used Hazm? Help shape our editorial sentiment research.