Skip to content

v0.2.0

Choose a tag to compare

@forzagreen forzagreen released this 19 Oct 14:43
33f1950

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 for conjugate. Bad input raises MaziniError with 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.py from a dataset checkout (#1).

Engine: synced to upstream checkpoint 7

Mirrors ar-verb.lua:

  • GEMINATE_ITBAA_ROOTS += شرر, لبب; SOUND_ROOTS += VIII:زوج.
  • SOUND_FORM_I_UU_ROOTS becomes SOUND_FORM_I_ROOTS, keyed root: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.0

PyPI: https://pypi.org/project/mazini/0.2.0/
Full Changelog: v0.1.0...v0.2.0