zimankit
zimankit logo: the deq tree-of-life sign with the sun of the flag of Kurdistan zimankit logo: the deq tree-of-life sign with the sun of the flag of Kurdistan

زمانکیت · 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
2written varieties: Sorani and Kurmanji
0dependencies: standard library only
46lessons in two complete courses
22chapters of developer documentation

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æm

Transliteration

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: false

Sentence 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.995

Wordlists 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.py

See how a sentence fits together

Type a Sorani or Kurmanji sentence and see how its words depend on each other. Click any word or arrow to learn its role, position and form.

a Kurmanji sentence drawn as coloured arrows between its words, with one word selected and explained

In 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

Any system with Python 3.11+, from PyPI.

pip install zimankit

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”.

the deq sign plus the sun of the flag of Kurdistan makes the zimankit logo