← Blog

Languages

Farsi, Dari, and Pashto: what a language system has to tell apart

Farsi and Dari are two varieties of Persian; Pashto is a separate language. How their codes, letters, and scores differ, and how to tell them apart.

Oct 12, 2026 · Updated Nov 9, 20265 min read8 sources

Why it matters

A document labeled with the wrong language, or at the wrong code level, goes to the wrong translation or search path and will not match later records.

The short version

  1. 1Farsi (Iranian Persian, pes) and Dari (prs) are two varieties of the Persian macrolanguage, fas. Pashto (pus) is a separate macrolanguage with three varieties.
  2. 2The letters ې and ۍ appear in the Unicode CLDR Pashto alphabet and in neither Persian list, so they point to Pashto. Text using only shared letters gives no letter clue.
  3. 3One Persian-Dari classifier scored 96 percent on its own corpus and 87 percent on 79,000 sentences from a different collection.

Farsi and Dari are two varieties of one language, Persian, and Pashto is a separate language. All three are written in the Arabic script with added letters, so the script alone does not tell a system which one a document is in.

That first label decides which translation model, search index, and records a document goes to. Get it wrong, or record it at the wrong code level, and the document is lost to later queries.

Farsi vs Dari vs Pashto at a glance

FarsiDariPashto
What it isIranian PersianEastern Persian, spoken mainly in AfghanistanA separate language
ISO 639-3 individual codepesprspbt, pbu, pst
ISO 639-3 macrolanguagefas, Persianfas, Persianpus, Pushto
NLLB-200 / FLORES-200 codepes_Arabprs_Arabpbt_Arab (Southern)
Unicode CLDR localefafa_AFps

Sources: ISO 639-3 macrolanguage mappings; Malmasi 2015; FLORES-200 README; CLDR Persian chart.

ISO codes for Persian, Dari, and Pashto

ISO 639-3 lists Persian, fas, as a macrolanguage with two individual languages: Iranian Persian, pes, and Dari, prs. Pashto, listed as Pushto, pus, is a separate macrolanguage with three: Southern Pashto, pbt; Northern Pashto, pbu; and Central Pashto, pst (macrolanguage mappings).

The trap is the level. "Persian" can mean fas or pes, depending on the system that wrote the label. A filter for prs will not return a document another system tagged fas.

The benchmarks show the drift. The FLORES-200 README maps its pes_Arab to the FLORES-101 code fas, and its pbt_Arab to pus. Same text, different code level.

Pick one rule: store the individual code (pes, prs, pbt) and derive the macrolanguage from it, never the reverse.

How to tell Pashto from Persian by its letters

Pashto uses letters Persian does not. The Unicode CLDR charts list these main letters:

LettersPersian (fa) mainPersian in Afghanistan (fa_AF) auxiliaryPashto (ps) main
پ چ ژ ک گYes-Yes
ټ ځ څ ډ ړ ږ ښ ګ ڼNoYesYes
ې ۍNoNoYes

Sources: CLDR Persian; CLDR Pashto.

So ې or ۍ points to Pashto. The nine letters in the middle row point toward Pashto but can show up in Persian written in Afghanistan. A text with only the shared letters gives no letter-level evidence either way.

How to tell Farsi from Dari

Letters will not do it. You need a classifier trained on both. Malmasi built a corpus of 28,000 sentences, 14,000 per language, and used character and word n-grams, runs of consecutive characters or words:

TestAccuracy
Same corpus96%
79,000 sentences from the Uppsala Persian Corpus87%

The 9-point drop is the lesson. A classifier's score on its own data overstates what it does on yours. The study also found Dari too different from Persian to use Persian resources directly, so folding Dari into Persian throws away a real distinction.

Invisible differences that break matching

Some characters look the same or show nothing at all:

  • Zero width non-joiner, U+200C. Unicode cites the Persian plural suffix as a place it is used (Unicode 18.0, Chapter 9). Both CLDR charts list it. A word typed with it and without it are different strings.
  • Farsi yeh, U+06CC. Unicode says it is used in Persian, Urdu, Pashto, Azerbaijani, Kurdish, and other languages. It does not identify one language.
  • Digits. Eastern Arabic-Indic digits, U+06F0 to U+06F9, are used in Afghanistan, India, Iran, and Pakistan. Arabic-Indic digits, U+0660 to U+0669, are used elsewhere. A digit tells you a region, not a language.

Normalize all three before you index or compare text. The Urdu Nastaliq OCR post covers the same script extensions from the recognition side.

How well machine translation handles them

FLORES-200 chrF++ on NLLB-200's 3.3B model (metrics file):

LanguageInto EnglishFrom English
Western Persian (pes_Arab)62.749.4
Dari (prs_Arab)62.552.4
Southern Pashto (pbt_Arab)58.238.6

Pashto out of English is the weak spot. The NLLB-200 and low-resource languages post explains what the model sizes and scores mean.

Why language identifiers mix them up

The PALI benchmark tested identification across 19 languages written in Perso-Arabic scripts. The PALI classifier confused one cluster most often: Persian, Gilaki, Mazanderani, Azeri Turkish, and Pashto. The authors added a second-stage model just for that cluster.

PALI also reports that three widely used identifiers, CLD3, langid.py, and Franc, scored no more than 0.15 F1 on its test set across all 19 languages and noise settings. PALI did not include Dari. The language identification post covers how these tools work and fail.

How to test a system on Farsi, Dari, and Pashto

  1. Feed it 20 known documents in each of the three. Count how many come back with the right label.
  2. Check the label level: does it return pes and prs, or only fa or fas?
  3. Feed Pashto text with ې or ۍ and text without them. Watch whether the label changes.
  4. Search one word typed with and without the zero width non-joiner. Both should match.
  5. Translate each language both directions and compare against the FLORES-200 numbers above.

What to do next

  • Decide which code level your records use, and convert every incoming label to it.
  • Keep Dari as its own label, not a subtype hidden under Persian.
  • Add a letter check for ې and ۍ as a cheap Pashto signal before the classifier.
  • Normalize zero width non-joiners, yeh variants, and digits in your search index and queries.
  • Test any identifier on your own documents, not the vendor's corpus.

Azcuna's BABEL reads, translates, and searches foreign-language documents entirely on-device, with no cloud and no connection, and keeps every claim tied to the passage it came from. The long read on offline machine translation goes further.

Questions people ask

What is the difference between Farsi, Dari, and Pashto?

Farsi and Dari are two varieties of Persian. Farsi is the Persian of Iran and Dari is the Eastern Persian spoken mainly in Afghanistan. Pashto is a different language. ISO 639-3 puts Iranian Persian and Dari under the Persian macrolanguage, fas, and puts Pashto under its own macrolanguage, pus, with Southern, Northern, and Central varieties. All three are written in the Arabic script with extra letters.

Is Dari the same as Farsi?

Close, but not the same. ISO 639-3 gives them separate codes, pes for Iranian Persian and prs for Dari, under one macrolanguage. A 2015 study by Shervin Malmasi describes them as two close variants with lexical, morphological, and spelling differences, and separated them with 96 percent accuracy on its own corpus. It found Dari too different to apply Persian resources directly.

How can you tell Pashto from Persian in writing?

Look for letters Persian does not use. The Unicode CLDR charts list ټ, ځ, څ, ډ, ړ, ږ, ښ, ګ, ڼ, ې, and ۍ in the Pashto alphabet. Nine of them also appear as auxiliary letters for Persian in Afghanistan, but ې and ۍ appear in neither Persian list. A text that uses only letters the two share gives no letter-level clue.

What is the ISO code for Dari?

The ISO 639-3 code for Dari is prs. It is an individual language inside the Persian macrolanguage, fas, alongside Iranian Persian, pes. In the FLORES-200 benchmark and the NLLB-200 translation model, Dari is prs_Arab, Western Persian is pes_Arab, and Southern Pashto is pbt_Arab. The older FLORES-101 set used the macrolanguage codes fas and pus instead.

Can machine translation handle Dari and Pashto?

Yes, with gaps. On FLORES-200, NLLB-200's 3.3B model scores 62.5 chrF++ from Dari into English and 52.4 from English into Dari, close to its Western Persian scores. Southern Pashto is weaker: 58.2 into English and 38.6 from English. Scores on your own documents can differ, so test on them before relying on any one number.

Sources

  1. 1ISO 639-3 Macrolanguage Mappings · SIL Global (ISO 639-3 code tables)
  2. 2The Unicode Standard, Version 18.0, Core Specification, Chapter 9: West Asia-I · The Unicode Consortium
  3. 3Locale Data Summary for Pashto [ps] · The Unicode Consortium (Common Locale Data Repository charts)
  4. 4Locale Data Summary for Persian [fa] · The Unicode Consortium (Common Locale Data Repository charts)
  5. 5Discriminating similar languages: Persian and Dari · Tiny Transactions on Computer Science, Volume 3 (2015), record hosted by Macquarie University
  6. 6PALI: A Language Identification Benchmark for Perso-Arabic Scripts · Association for Computational Linguistics (VarDial 2023)
  7. 7FLORES-200 (README) · Meta AI Research (facebookresearch on GitHub)
  8. 8NLLB-200 3.3B dense model: FLORES-200 metrics (metrics.csv) · Meta AI Research

Where this shows up in our work

More on languages