ACE Grammar Engine · Documentation
Guided methodology · Draft Rev04

How ACE Approaches Token and Pattern Analysis

ACE begins with the original Qurʾānic Arabic token and examines its grammatical attachments, morphological structure, possible roots, and supporting lexical evidence. The aim is to identify all structurally supported analyses, not to force every token into a single answer.

Distinct from Token Recognition Testing: This chapter explains how ACE analyzes tokens and patterns. The Token Recognition testing page provides learner exercises organized by difficulty level. They are related, but they serve different purposes.
Start with one token at a time. Each difficulty level teaches a noun, a particle, a verb, and the definite article ٱلـ separately. Open Level 2 only after Level 1 is clear. The examples are teaching illustrations; they are not claims of specific Qurʾānic occurrences.

Guided examples — three difficulty levels

Level 1 · Recognize one simple token

Look at one word or particle at a time. First identify its grammatical class; do not try to split it into a root and pattern yet.

OrderOne tokenMeaningRecognize
1 · NounكِتَابٌA bookIsm — names a thing.
2 · ParticleمِنْFromḤarf — a preposition.
3 · VerbكَتَبَHe wroteFiʿl — an action.
4 · ArticleٱلْـTheDefinite article — an attached element, not normally a standalone written token.
كِتَابٌ ← ٱلْكِتَابُ

A book → the book. The article joins the noun; ٱلْكِتَابُ is one written token.

Learn more: Arabic Grammar Foundations, Sections 1 (word classes), 4 (nouns and definiteness), 5 (verbs), and 7 (articles and particles).

Level 2 · Recognize a small change or attachment

Stay with familiar word classes, but notice how a single written token changes.

ClassLevel 1Level 2 tokenNew observation
NounكِتَابٌكِتَابٍGenitive case ending, as after a preposition.
ParticleمِنْمِنْهُPreposition + attached pronoun “him/it”.
VerbكَتَبَيَكْتُبُImperfect “he writes”; a different pattern of the same root.
Article + nounٱلْكِتَابُٱلْكِتَابِDefinite noun with a genitive case ending.
مِنْ + كِتَابٍ → مِنْ كِتَابٍ

From a book. These are two written tokens: a particle and a noun. Not everything combines into one token.

Learn more: Foundations, Sections 4, 5, 7, and 8; Method Section 2 — token components and Method Section 3 — ND recognition.

Level 3 · Analyze more complex single tokens

Now recognize multiple components within one written token, and begin to use ACE's structural categories.

ClassOne tokenWhat ACE examines
NounوَٱلْكِتَابِAttached وَ + definite noun ٱلْكِتَابِ; interpretation of wāw depends on context.
Particle / NDفَمِنْهُمْفَ + مِنْ + هُمْ; no invented triliteral root.
VerbيَكْتُبُونَForm I, active imperfect indicative, subject index 3: 1.2.3.
Article + nounبِٱلْكِتَابِAttached preposition بِـ + article ٱلْـ + noun in the genitive.
يَكْتُبُونَ + هُمْ → يَكْتُبُوهُمْ

The indicative plural nūn drops before the object pronoun, while the subject remains third-person masculine plural. This is a constructed teaching illustration.

يُكْتَبُ

At a more advanced stage, ACE can retain both 1.8.1 and 4.8.1 where their passive imperfect structural templates match. A single surface token need not have only one valid hypothesis.

Learn more: Method Section 3 — ND matching, Method Section 4 — Form.T.Index, Method Section 5 — suffixes, Method Section 8 — ambiguity, and the ACE Conjugator.

ACE analysis method — detailed reference

1. The Arabic token is the primary evidence

ACE uses the Arabic token itself—not a Roman spelling, IPA transcription, or English translation—as the authority for morphological analysis. It retains the original Muṣḥaf spelling for display, including meaningful distinctions among hamza forms, hamzat al-waṣl (ٱ), alif maqṣūrah (ى), vowels, sukūn, and shaddah.

Matching may use carefully controlled variants to account for relevant orthographic or Tajwīd effects. Those variants do not replace the displayed source token.

2. A token may contain multiple grammatical components

One written Qurʾānic token can contain a preceding particle, a word stem, an inflectional ending, and an attached pronoun. ACE therefore examines segmentation hypotheses rather than assuming that the entire token is one indivisible morphological form.

وَيَكْتُبُوهُمْ

وَيَكْتُبُوهُمْ — illustrative segmentation: preceding وَ, verbal surface يَكْتُبُو, and object pronoun هُمْ.

The indicative third-person masculine plural ending normally includes نَ (يَكْتُبُونَ); with this object-pronoun attachment, that nūn is absent. The subject index remains unchanged. This example illustrates an analysis rule, not a claim that this exact token occurs in the Qurʾān.

3. Recognize non-derived (ND) entities without inventing roots

Prepositions, conjunctions, pronouns, demonstratives, relatives, and other non-derived entities must be recognized on their own terms. ACE checks the exact entity and relevant permitted attachments, including the four broad combinations below.

StageMatching shape
1PREPEND + EXACT + APPEND
2EXACT + APPEND
3PREPEND + EXACT
4EXACT
فَمِنْهُمْ

فَمِنْهُمْ can be examined as فَ + مِنْ + هُمْ. The preposition مِنْ does not require a triliteral-root analysis.

4. Generate possible verbal and nominal structures

For derived words, ACE tests possible structural analyses against established patterns. Its identification format is Form.T.Index:

1.2.3 = Form I · T2 (active imperfect indicative) · subject index 3 (third-person masculine plural).

ACE's verbal categories use T1–T14; nominal categories use T15–T25. The applicable pattern, prefix, vowel structure, suffix family, and grammatical index must agree. A superficial resemblance to a known root is not enough.

ACE excludes passive T7, T8, and T16 for Forms VII and IX. Eligible other Forms retain applicable passive analyses.

5. Examine prefixes and suffix families

ACE considers imperfect prefixes, perfect and imperfect inflectional endings, subjunctive and jussive endings, emphatic endings, imperative and prohibitive structures, object-pronoun attachments, and nominal declension endings. Candidate suffix families are examined without prematurely discarding distinct hypotheses that share the same physical ending.

The Arabic pattern determines whether a proposed segmentation is structurally compatible; merely finding a familiar suffix does not prove an analysis.

6. Recover roots structurally

ACE identifies root radicals as r0, r1, and r2 for triliteral roots. Root recovery accounts for Form-specific templates and special behavior in weak, hamzated, and geminated roots. It is not equivalent to removing a fixed number of characters from the beginning or end.

يَكْتُبُونَ ← ك ت ب

The root ك ت ب can be recovered through a compatible verbal structure.

Structural root recovery and dictionary lookup are separate checks. A structurally possible root should remain identifiable as a hypothesis even when lexical confirmation is unavailable.

7. Test Form.T.Index compatibility

ACE compares each candidate against the physical requirements of its proposed pattern, including relevant letters, length, vowel placement, long vowels, shaddah, prefix, and ending. Its structural checks are intended to distinguish look-alike forms that are not actually compatible.

Diagnostic information can expose the original token, candidate segmentation, removed ending, remaining structure, and reasons a hypothesis passed or failed. The exact diagnostics depend on the implementation and test mode.

8. Preserve genuine ambiguity

When two or more analyses satisfy the applicable rules, ACE retains them rather than selecting one arbitrarily.

يُكْتَبُ
CandidateInterpretation
1.8.1Form I · passive imperfect · index 1
4.8.1Form IV · passive imperfect · index 1

Both are retained as structurally compatible hypotheses; context and independent lexical evidence may inform subsequent interpretation.

9. Validate against lexical evidence

Dictionary validation asks whether the recovered root and the proposed formation have lexical support. This is not the same question as whether a surface form fits a structural template. In particular, T17 verbal nouns (maṣdars) require attested lexical support; not every plausible template is an attested maṣdar for a particular root.

10. The overall analysis approach

The following is a conceptual workflow, not a claim that every internal PHP function executes in precisely this order.

  1. Read and preserve the original Qurʾānic Arabic token.
  2. Prepare only permitted matching variants while retaining the original display.
  3. Examine ND entities, preceding particles, and attached pronouns.
  4. Generate possible verbal and nominal segmentation hypotheses.
  5. Evaluate relevant prefixes, suffix families, and structural patterns.
  6. Recover possible roots independently of dictionary availability.
  7. Test each candidate's Form.T.Index compatibility.
  8. Check lexical and dictionary evidence separately.
  9. Retain all independently supported hypotheses and expose useful diagnostics.
11. Analysis versus recognition exercises
Token and Pattern AnalysisToken Recognition Testing
Explains ACE's analytical methodExercises learners' recognition skills
Examines structural hypotheses and evidenceOrganizes practice by difficulty level
Preserves legitimate multiple interpretationsAssesses responses within an exercise
Documents root recovery, ND matching, and validationProvides a learning and testing interface
12. Guiding principle
Begin with the Arabic evidence. Recover possible structures and roots. Validate what can be validated. Preserve every interpretation that remains supported by the established grammatical and structural rules.

Draft status: terminology and illustrative examples should be checked against the current reverse-analyzer implementation during the next review round. No analyzer functions are called by this documentation page.