Repository navigation
v0.2.0
New: mazini.lexicon, "is it a verb?"
The engine conjugates any root on any pattern, and most such combinations are not words. mazini.lexicon says which ones are attested, using the four root × pattern tables of m-bakni/arabic-morphology (جداول إحصاء الأفعال العربية, CC BY 4.0): 24,188 verbs over 7,626 roots.
- API:
lexicon_roots(),attested_wazns(root),is_attested(root, wazn),LEXICON_INFO. Roots and patterns are written as forconjugate. Bad input raisesMaziniErrorwith the same codes. - The data (44 KB, one fixed-width record per root: radicals in Buckwalter plus a bitmask of attested patterns) is decoded on first use. Nothing else in the package imports it, and it never restricts
conjugate. - CLI:
mazini كتب(root alone) lists the root's attested patterns with their form codes. The conjugation table now says وارد / غير وارد. - Regenerate with
tools/gen_lexicon.pyfrom a dataset checkout (#1).
Engine: synced to upstream checkpoint 7
Mirrors ar-verb.lua:
GEMINATE_ITBAA_ROOTS+= شرر, لبب;SOUND_ROOTS+= VIII:زوج.SOUND_FORM_I_UU_ROOTSbecomesSOUND_FORM_I_ROOTS, keyedroot:vowels(هيء:uu, أوب:ia).- New
FORM_VIII_UNASSIMILATED_W_ROOTS(وشي: اِيتَشَى / يَوْتَشِي).
Fixtures regenerated from upstream: the book suite now covers 495 paradigms / 16,593 forms (was 462 / 15,549), all matched. Golden parity: 7,884 inputs / 744,356 variants. Hamza: 55,340. loose: 51,997.
Install
pip install mazini==0.2.0PyPI: https://pypi.org/project/mazini/0.2.0/
Full Changelog: v0.1.0...v0.2.0