This page shows high–level diagrams of how ACE analyzes an input word, from raw text → root → form → tense → pronoun / declension, and finally to Arabic, IPA, and Tajwīd-colored output.
At a high level, every ACE tool (Analyzer, Stem Tester, Reverse Analyzer) passes through the same core stages:
User Input ↓ Normalize (Latin / Arabic) ↓ Tokenize (prefix, stem, suffix) ↓ Dictionary / root lookup ↓ Form & pattern detection (I–X, weak vs strong) ↓ Tense / pronoun / declension resolution ↓ Arabic script + IPA + Tajwīd coloring ↓ Frequency lookup (Qurʼān DB) & translations
The following sections break this into separate flowcharts:
root + form + tenseArabic or Latin wordUser chooses: root (r0–r1–r2), form (I–X), tense (1–43), pronoun, and optionally declension.
ACE builds a canonical stem pattern for that form:
faʿala, faʿʿala, fāʿala, ʼafʿala, tafaʿʿala, …
using your $infl1, $infl2 and form rules.
Pronoun + tense decide:
prefix (e.g. ya-, ta-, na-, ea-) and
suffix (e.g. -u, -na, -uwna or declension endings).
ACE combines them into:
$prefix . $stem . $suffix.
The combined Latin form is passed to:
ACE queries the Qurʼān DB for the transliteration token and displays:
يَكْتُبُونَ
The same color system is used consistently in the Analyzer, Stem Tester, and documentation tables.
This flow is used by ace_reverse_analyzer.php and the
standalone tool in /ace/reverse/.
User enters an Arabic or Latin word (e.g. yaktubuwna or
يَكْتُبُونَ).
ACE normalizes:
sh, kh, AA)Using merged suffix arrays: verb endings, declension endings, attached pronouns, ACE removes the longest matching suffix first, then checks for imperfect prefixes.
Longest match first
The remaining core (e.g. yaktub) is analyzed letter-by-letter:
ya-, ta-, na-, eu- if presentv1, v2 from remaining vowels
Using patterns (doubling, extra ta, sta,
internal vowels), ACE proposes a likely form and tense:
ta, assimilation rules)If the root exists in your dictionary arrays, ACE displays:
Weak verbs follow the same pipeline, but extra checks are inserted after root detection:
After extracting r0, r1, r2, ACE tags the verb as:
For example, a hollow verb in passive past will use
fuʿila → قِيلَ;
a defective verb will drop the final vowel in jussive / imperative.
ق و ل → قَالَ, يَقُولُ, قِيلَ
These colors match the legend in color_legend.php and are reused
in Analyzer and Stem Tester outputs.