Pashto () is an IndoIranian language spoken by over 50million people across Afghanistan and Pakistan. Its rich inflectional system, extensive use of prefixes, suffixes, and cliticisation, makes automatic morphological analysis a challenging but essential task for downstream applications such as machine translation, speechtotext, and information retrieval.
Finite State Transducers (FSTs) have become the defacto standard for modelling morphology because they combine:
For Pashto, where regular suffixes convey tense, aspect, gender, and number, an FST can directly encode these alternations while still allowing for exceptions and lexical irregularities.
The analyzer described here is built on a sizeable, annotated Pashto corpus (approximately 2million word tokens). The workflow follows three major steps:
Texts were gathered from newspapers, literary works, and online forums. Unicode Normalisation Form C (NFC) was applied to ensure consistent encoding of diacritics and character variants (e.g., vs ).
From the normalized corpus a highfrequency lemma list was extracted. Lemmas were manually verified and tagged with POS information (Noun, Verb, Adj, etc.). For each lemma the following morphological features were recorded:
Statistical alignment between lemmas and their surface forms identified recurrent affix patterns. These patterns were then encoded as regular expressions that feed into the FST compiler. For example, the verb stem (to do) combines with the presenttense suffix - to produce (you do). The rule is represented as:
VerbStem+PresentSuffix -> VerbStem+PresentSuffix
Irregularities such as vowel deletion or gemination are captured by separate rewrite rules.
The analysis engine is built with FOMA, an opensource toolkit for constructing weighted FSTs. The architecture consists of three layers:
A symbol table maps each lemma to a unique identifier. Each entry includes a set of morphological tags encoded as feature bundles (e.g., +N+SG+ACC).
All productive affixes are listed together with their feature specifications. For instance:
+V+PAST+3SG -> -+N+PL+GEN -> -+Adj+COMP -> -
Contextual rewrite rules handle phonological alternations. Example rule for vowel harmony:
[ae] -> [i] / _[+Vowel] # fronting before a high front vowel
The three layers are compiled into a single transducer that maps an input surface form to a set of possible analyses.
Using a heldout test set of 10000 manually annotated words, the analyzer achieved:
Most errors stem from:
Below are illustrative outputs produced by the analyzer.
Input: Analysis 1: +N+PL+ACCAnalysis 2: +N+PL+OBL
Input: Analysis: +V+PAST+3SG
Input: Analysis: +Adj+SUPERL+DEF
The analyzer can be combined with:
Planned enhancements include:
The presented corpusbased finite state morphological analyzer delivers highaccuracy analysis of Pashto word forms while remaining computationally lightweight. By grounding the rule set in a large, authentic corpus, the system captures both regular inflectional patterns and frequent irregularities. Its modular architecture allows straightforward extension and integration with downstream NLP components, providing a solid foundation for the continued development of Pashto language technologies.
For the source code, data, and detailed documentation visit the project repository.
