Why divide language into levels?
Linguists are used to describing language in graded levels, each building on the one before. Natural language processing inherited this division in the form of a processing pipeline: tokenization, then morphological analysis, then part-of-speech tagging, then syntactic parsing, then meaning extraction. The useful thing about this division is that it makes errors diagnosable: if the system gets the subject wrong, is the error in morphological segmentation, in tagging, or in parsing?
The levels and their computational tasks
| Level | What it studies | Corresponding computational task | Arabic example |
|---|---|---|---|
| Phonology | Sounds and their pronunciation | Speech recognition and automatic diacritization | «عِلْم» versus «عَلَم» |
| Morphology | Word structure | Stemming, segmentation and morphological analysis | وسيكتبونها = و + س + يكتب + ون + ها |
| Syntax | Sentence structure | Part-of-speech tagging and syntactic parsing | Identifying the subject and the object |
| Semantics | Literal meaning | Word sense disambiguation, semantic representations and inference | Is «البنك» a financial institution or a riverbank? |
| Pragmatics | Meaning in use | Sarcasm detection, and intents in dialogue | «يا سلام على الخدمة!» may be praise or sarcasm |
| Discourse | Coherence between sentences | Coreference resolution and summarization | «وصل الطالب متأخراً لأنه…» ("The student arrived late because he…"): whom does the pronoun refer to? |
The morphological level in Arabic
Arabic is a morphologically rich language with a non-concatenative structure: a word is formed from a root (usually triliteral, such as ك-ت-ب) cast into a pattern (فاعل, مفعول, استفعل), then prefixes (و, ف, ب, ل, ك, س, ال) and suffixes (attached pronouns, plural and feminine markers) attach to it. So a single Arabic word is sometimes equivalent to a whole English sentence: “فسيكفيكهم” = *so He will suffice you against them*. This makes morphological analysis a decisive step before any other task, and you will learn its details in the lesson "Computational Arabic morphology".
Ambiguity at every level
Ambiguity is when an input allows more than one correct analysis. Its kinds include:
- Lexical ambiguity: a single word with several meanings (homonymy). “عين”, “بنك” and “سائل”.
- Morphological ambiguity: “كتب” without diacritics may be كَتَبَ, كُتِبَ, كُتُب or كَتَّبَ. Studies of Arabic corpora indicate that an undiacritized word allows several morphological analyses on average, far more than in English.
- Structural ambiguity (Structural): “رأيت الرجل بالمنظار” ("I saw the man with the binoculars"), where the prepositional phrase can attach to the verb or to the noun. Similarly “أكرمَ الطالبُ المعلمَ” when the diacritics are dropped and fronting is allowed: in “أكرم موسى عيسى” the subject can only be known from word order or context.
- Referential ambiguity (Referential): “أخبر خالد سعيداً أنه نجح” ("Khalid told Saeed that he passed"), where the pronoun may refer to either of them.
- Pragmatic ambiguity: “هل تستطيع أن تناولني الملح؟” ("Can you pass me the salt?") is formally a question about ability, and in use a request.
The pipeline versus end-to-end learning
In the classic pipeline, the stages run in sequence, each with its own model. Its advantages are transparency and reusable components. Its drawback is error propagation: an error in segmentation carries over to tagging and then to parsing.
End-to-end modelling (End-to-End), by contrast, learns to go from raw text to the final output directly, as in pretrained models fine-tuned on the task. Tenney and colleagues (2019) showed that BERT's layers implicitly rediscover the classic pipeline: the lower layers encode part-of-speech information, the middle ones syntactic structure, and the upper ones semantic and referential information. In other words, the levels did not disappear; they became embedded in the representations.
A practical rule: even with modern models, when your system fails, ask: at which level did the error happen? Many errors of Arabic models come from tokenization or morphology, not from "understanding".
Try it in the lab
Open the Morphology module and type “وسيكتبونها” to see the segmentation, then the Parts of speech module and type “كتب الطالب الدرس” and notice how rule-based tagging handles the ambiguity of “كتب”, then the Syntactic parsing module to see the dependency relations.
