Levels of linguistic analysis and ambiguity

Levels of Linguistic Analysis and Ambiguity

How language is divided into levels (phonological, morphological, syntactic, semantic, pragmatic, discourse), the computational task that corresponds to each level, and how ambiguity appears at each level, with Arabic examples.

Lesson 2 of 38Beginner30 minutes

Lesson objectives

  • Link each linguistic level to a specific computational task.
  • Recognize the kinds of lexical, structural and referential ambiguity.
  • Understand the idea of a processing pipeline versus end-to-end modelling.
Page contents
  1. Why divide language into levels?
  2. The levels and their computational tasks
  3. Ambiguity at every level
  4. The pipeline versus end-to-end learning
  5. Try it in the lab

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

LevelWhat it studiesCorresponding computational taskArabic example
PhonologySounds and their pronunciationSpeech recognition and automatic diacritization«عِلْم» versus «عَلَم»
MorphologyWord structureStemming, segmentation and morphological analysisوسيكتبونها = و + س + يكتب + ون + ها
SyntaxSentence structurePart-of-speech tagging and syntactic parsingIdentifying the subject and the object
SemanticsLiteral meaningWord sense disambiguation, semantic representations and inferenceIs «البنك» a financial institution or a riverbank?
PragmaticsMeaning in useSarcasm detection, and intents in dialogue«يا سلام على الخدمة!» may be praise or sarcasm
DiscourseCoherence between sentencesCoreference 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.

Lesson summary

  • The levels: phonological, morphological, syntactic, semantic, pragmatic, discourse.
  • Ambiguity appears at every level, and resolving it requires context.
  • Modern systems learn these levels implicitly, but understanding them helps diagnose errors.

Check what you understood

Choose an answer for each question to see the correction and the reasoning. Your answers are not sent anywhere.

  1. The sentence «رأيت الرجل بالمنظار» ("I saw the man with the binoculars") is an example of which kind of ambiguity?

  2. Which task corresponds to the morphological level?

References

  1. Jurafsky, D. & Martin, J. H. Speech and Language Processing (3rd ed. draft) web.stanford.edu/~jurafsky/slp3/
  2. Habash, N. (2010). Introduction to Arabic Natural Language Processing. Morgan & Claypool doi.org/10.2200/S00277ED1V01Y201008HLT010
  3. Tenney, I., Das, D. & Pavlick, E. (2019). BERT Rediscovers the Classical NLP Pipeline. ACL aclanthology.org/P19-1452/