Repository navigation
New: transitivity, the passive, and the مدغم shape
mazini/lexiconkeeps each listed verb's ل / م / ك mark from the tables, which used to be dropped:transitivity(root, wazn)→"intransitive" | "transitive" | "both" | nulllexiconPassive(root, wazn)→ the passive that follows from it:"pass"(transitive: ضُرِبْتُ),"ipass"(intransitive: جُلِسَ عَلَيْهِ only),"nopass"(patterns that never take one: فعُل, انفعل, افعلّ…), ornullif not listed.
conjugate'spassiveoption also takes"pass","ipass"or"nopass"; anything else throwsMaziniError("bad_option"). The engine's guess from the pattern is often wrong for form I (it gives جلس a full passive, *جُلِسْتُ); passlexiconPassive(...)instead.reducible(root, wazn)says whether Arabic has the assimilated (مدغم) shape thatreduced: trueproduces: تفعّل / تفاعل with ف in ت ث د ذ ز س ش ص ض ط ظ, انفعل with م, اتّخذ / اتّزر / اتّحد, اسطاع, افعنلل with ل1 و or ي.conjugatestill applies it to any root, as the Lua module does (*اِكَّتَّبَ).
conjugate's output with default options is unchanged: byte-identical to Module:ar-verb on the 7,884 golden inputs, and all 16,593 book forms still match. The lexicon entry point grows from 46 KB to 55 KB (#17).
Demo
- The passive comes from the lexicon, with the verb's transitivity shown; a فعل لازم gets no passive unless the reader asks for the impersonal one (#17, #19).
- Options are offered only when they change the verb, labelled with the verb's own forms («الصيغة المُدغَمة: اِسَّمَّعَ بدل تَسَمَّعَ») (#16).
- Compact mobile layout (#18).
The Python port is released alongside with the same API: mazini 0.3.0.
Install
npm install mazini@0.3.0npm: https://www.npmjs.com/package/mazini/v/0.3.0
Full Changelog: v0.2.2...v0.3.0