زمانکیت · ziman means “language”
The toolkit for written Kurdish
Normalise, transcribe, transliterate, analyse and conjugate Sorani and Kurmanji, and see how a sentence fits together, from Python or the command line.
pip install zimankit
Everything a Kurdish text needs
Each skill works for both written varieties. The language is detected from the script, or you choose it.
Orthography
Normalise Arabic and Persian look-alike letters, Hawar Latin spellings and invisible characters, and validate words against the alphabet.
كوردي → کوردیIPA and syllables
Grapheme-to-phoneme rules for both varieties, including the unwritten Sorani vowel (bizroke), with syllable boundaries.
کتێبەکەم → k(ɯ).teː.bæ.kæmTransliteration
Sorani from the Arabic-based script to Latin, and Kurmanji from Hawar Latin to the Arabic-based script.
Îro hewa xweş e → ئیرۆ هەوا خوەش ئەMorphology
Segment and analyse words into lemma, part of speech, definiteness, number, case, gender and enclitics, with ranked analyses.
ماڵەکانمان → ماڵ+ەکان+مانVerb paradigms
Conjugate any verb through every tense, mood, person and polarity, including compound verbs and verbs not in the reference list.
zimankit conjugate کردنErgativity
Check Kurmanji split ergativity: in past transitive clauses the verb agrees with the object, and zimankit says when it does not.
Min tu dîtim. → agreement_ok: falseSentence structure
See how the words of a sentence depend on each other: subject, object, adpositions, ezafe. Click through a diagram that explains each word.
zimankit parse "Ew baş e."Language identification
Tell Sorani, Kurmanji, Zazaki and Gorani apart from each other and from Persian, Arabic, Turkish and English.
Ma yew roje … → zza 0.995Wordlists and data
Build clean wordlists, lemma tables and grammar rules from dictionaries, wiki dumps and corpora, and export a flat Kaggle dataset.
python run_pipeline.pyIn the terminal
Real output of the zimankit command. Every command reads from its arguments or from standard input.
$ zimankit ipa پیاوەکە کتێبەکەم jinekê dîtin pjaːwækæ k(ɯ)teːbækæm ʒɪnɛkeː diːtɯn $ zimankit translit "ئەمڕۆ هەوا خۆشە" "Îro hewa xweş e" emrro hewa xoşe ئیرۆ هەوا خوەش ئە $ zimankit lid "Ma yew roje şima ra vat ke ziwanê ma zaf rind o" zza 0.995 Ma yew roje şima ra vat ke ziwanê ma zaf rind o
$ zimankit parse "Min pirtûk xwend." 1 Min min PRON 3 nsubj 2 pirtûk pirtûk NOUN 3 obj 3 xwend xwendin VERB 0 root 4 . . PUNCT 3 punct $ zimankit conjugate کردن | head -2 دەکەم tense=present,mood=indicative,person=1sg ناکەم tense=present,mood=indicative,person=1sg,polarity=neg $ echo "Min tu dîtim." | zimankit ergativity … "alignment": "ergative", "agreement_ok": false, "notes": ["verb ending marks 1sg but object 'tu' is 2sg"]
Install
zimankit 0.4.0 needs Python 3.11 or newer and has no dependencies. Every file is on the latest release.
pip, from GitHub
A tagged version, or the latest main.
pip install "git+https://github.com/0xdolan/zimankit.git@v0.4.0"
Debian, Ubuntu, Kali
The .deb installs the library and the zimankit command system-wide.
sudo apt install ./python3-zimankit_0.4.0-1_all.deb
From source
With the docs, tutorials, data pipeline and tests.
git clone https://github.com/0xdolan/zimankit.git cd zimankit && pip install -e ".[dev]" python -m pytest -q
Check a download with sha256sum -c SHA256SUMS. Optional extras: [data] to read .mdx and .zim files, [kaggle] for the Parquet export.
from zimankit import analyze, normalize, parse, to_ipa, identify
analyze("کتێبەکەم")[0].segmentation # 'کتێب+ەکە+م'
to_ipa("jinekê") # 'ʒɪnɛkeː'
normalize("كوردي") # 'کوردی'
identify("Îro hewa xweş e").lang # 'kmr'
parse("Ew baş e.").tokens[1].deprel # 'root'
Use it from Python
The same skills as a small library. Read the Python API, the developer chapters or the tutorials.
A sun at the heart of a sign of life
The logo is a deq sign, the traditional hand-poked tattoo of Kurdish women: the figure read as the tree of life. At its heart shines Roj, the 21-rayed sun of the flag of Kurdistan. Roj means both “sun” and “day”.
Keep going
Tutorials
Learn Sorani or Kurmanji from zero: 23 lessons each, from the alphabet to ergativity.
Developer docs
22 chapters on Unicode, orthography, phonology, morphology, sentence structure and the pipeline.
Kaggle dataset
Kurdish Lexicon: one row per word, 59 columns.
Source code
The GitHub repository, issues and pull requests.
Releases
Wheel, sdist, .deb, source archives and checksums.
Brand kit
Logo, icons, social cards, banners and print files.
