Skip to content

v0.3.0

Latest

Choose a tag to compare

@github-actions github-actions released this 03 Nov 10:01
7a28d5e

New: transitivity, the passive, and the مدغم shape

  • mazini.lexicon keeps each listed verb's ل / م / ك mark from the tables, which used to be dropped:
    • transitivity(root, wazn) → "intransitive" | "transitive" | "both" | None
    • lexicon_passive(root, wazn) → the passive that follows from it: "pass" (transitive: ضُرِبْتُ), "ipass" (intransitive: جُلِسَ عَلَيْهِ only), "nopass" (patterns that never take one: فعُل, انفعل, افعلّ…), or None if not listed.
  • conjugate's passive argument also takes "pass", "ipass" or "nopass"; anything else raises MaziniError("bad_option"). The engine's guess from the pattern is often wrong for form I (it gives جلس a full passive, *جُلِسْتُ); pass lexicon_passive(...) instead.
  • reducible(root, wazn) says whether Arabic has the assimilated (مدغم) shape that reduced=True produces: تفعّل / تفاعل with ف in ت ث د ذ ز س ش ص ض ط ظ, انفعل with م, اتّخذ / اتّزر / اتّحد, اسطاع, افعنلل with ل1 و or ي. conjugate still applies it to any root, as the Lua module does (*اِكَّتَّبَ).

conjugate's output with default arguments is unchanged, and the golden and book suites still pass (#6). Same API and the same lexicon data as mazini-js 0.3.0.

Install

pip install mazini==0.3.0

PyPI: https://pypi.org/project/mazini/0.3.0/
Full Changelog: v0.2.2...v0.3.0