Morphological analysis

Arabic Morphological Analysis Lab

Extract prefixes, suffixes, stem and root, compare light stemming with root-based stemming, and view the possible segmentations of an ambiguous word.

What is this module?

An Arabic word is built from a root (usually three letters) cast in a pattern, and then takes prefixes (و، ف، ب، ك، ل، س، ال) and suffixes (pronouns, plural and feminine markers). Light Stemming removes only the common prefixes and suffixes and keeps the Stem; Root-based Stemming tries to reach the root by matching patterns; Lemmatization returns the word to its dictionary form (the masculine singular for nouns and the past tense for verbs); and full Morphological Analysis gives every possible analysis with features (gender, number, tense...) and needs a morphological lexicon such as CALIMA-Star in CAMeL Tools.

Tool: Morphological analysis

Runs in your browser (JavaScript) — your text is not sent anywhere
Settings

How does the tool work?

  • Light10: remove “و” if 3 letters remain, then the definite article (ال، وال، بال، كال، فال، لل) if two letters remain, then the suffixes (ها، ان، ات، ون، ين، يه، ية، ه، ة، ي) in order.
  • ISRI: remove three- and two-letter prefixes and suffixes, then match the patterns of four-, five- and six-letter words (a literal port from NLTK).
  • Root: the ISRI output is compared with the database root list to set the confidence level.
  • Lemma: a lookup in the limited lemma lexicon in the database only, with no guessing.
  • Segmentation options: every segmentation the clitic rules allow, marking those whose stem is in the dictionary.

How to read the results?

Each result has its source and confidence level: "found in the root list" is stronger than "derived from the pattern only", and the latter is an algorithmic estimate that may be wrong. When more than one segmentation appears, the word is ambiguous out of context.

Algorithms and methods

We always distinguish between traditional algorithms, resource-based methods and trained models. The tools on this page are traditional or lexicon-based, while trained models are explained here and run only through an external engine enabled by the site admin.

Limitations and accuracy limits

There is no full morphological analysis or automatic diacritization in the default mode. The roots produced by ISRI are approximate and fail with weak and doubled verbs and loanwords. The lemma lexicon is small. For accurate analysis, enable the Python engine with CAMeL Tools in the settings.

This tool's results are educational: they show how the algorithm works step by step, and they are not presented as confirmed scientific results.

From the knowledge base

Rule

Common prefixes in Arabic

Prefixes include the conjunctions (و، ف), the attached prepositions (ب، ك، ل), the definite article (ال), the future particle (س), and the lam of command and the lam of purpose. They can combine, as in «وبال», «فسـ» and «وللـ».

Arabic grammar

Rule

Common suffixes in Arabic

Suffixes include the plural and dual markers (ون، ين، ات، ان), taa marbuta (ة), the nisba yaa (ي، ية), the attached pronouns (ه، ها، هم، هن، كم، نا، ي، ني), and verb suffixes (وا، تم، تن، نا).

Arabic grammar

Rule

Common morphological patterns

Noun patterns include فاعل (كاتب), مفعول (مكتوب), فعيل (كبير), فِعال (كتاب), مَفْعَلة (مكتبة) and تفعيل (تعليم). Verb patterns include فعّل, فاعل, أفعل, تفعّل, انفعل, افتعل and استفعل.

Arabic grammar

Concept

Arabic morphological analysers

Well-known analysers include BAMA and SAMA (Buckwalter and LDC), MADAMIRA, CALIMA-Star in CAMeL Tools, and Farasa from QCRI. They differ in licence, dialect support and output formats.

Buckwalter (2004); Pasha et al. (2014); Obeid et al. (2020); Abdelali et al. (2016)

Frequently asked questions

What is computational morphology?

The automatic study of word structure: the root, the pattern, prefixes and suffixes, and features such as tense, number and gender. It includes stemming, affix stripping, root extraction and full morphological analysis.

What is the difference between the root, the stem and the lemma?

The root is the set of original letters (ك ت ب). The stem is what remains after removing prefixes and suffixes (كاتب from «الكاتبون»). The lemma, or dictionary entry, is the dictionary form, such as the singular past verb «كَتَب» or the singular noun «كاتب».

What is the Light10 algorithm?

A light stemming algorithm introduced by Larkey and colleagues that removes a specific set of prefixes (such as ال and وال with و ب ك ف) and suffixes (such as ها ان ات ون ين يه ية ه ة ي) subject to conditions on word length. It does not extract the root, and was designed to improve information retrieval.

What is the ISRI algorithm?

A stemming algorithm introduced by Taghva and colleagues in 2005 that relies on patterns without a root dictionary. It removes prefixes and suffixes, then matches patterns for words of 4 to 7 letters to reach a triliteral or quadriliteral root. The lab's implementation matches that of the NLTK library.

Why does ISRI sometimes give an incorrect root?

Because it uses no root dictionary, so it only matches patterns on the surface. Words with weak, doubled or irregular letters, and foreign names, may produce wrong roots.

What is the Khoja algorithm?

A root extraction algorithm that removes prefixes and suffixes, then matches patterns and checks the result in a root dictionary. The lab explains it but does not run it as is, because its original lists are not included; instead it shows a simplified root extractor that relies on the root dictionary in the database.

What does the confidence level in root extraction mean?

"Dictionary" means the proposed root is in the built-in root dictionary. "Pattern" means it comes from a pattern match without dictionary confirmation. "Unknown" means the tool did not reach an acceptable root.

What is the difference between light stemming and root extraction in search?

Light stemming groups words with close meanings, such as «كتاب» and «الكتابين», and is usually preferred in retrieval. Root extraction groups words with distant meanings, such as «كتاب», «مكتب» and «كاتب», which raises recall and lowers precision.

How do I find the lemma of an Arabic word?

That needs a morphological analyser and a dictionary, such as CAMeL Tools or Farasa. The lab finds the lemma by looking it up in a small lemma dictionary in the database, and says "not in the dictionary" if it does not find it instead of guessing.

What is morphological ambiguity?

When an undiacritized word allows more than one analysis, such as «علم» (عِلْم، عَلَم، عَلِمَ، عُلِّمَ). Full analysers give a list of analyses, then a disambiguator picks one according to the context.

What is a full morphological analyser?

A tool that gives each word all its possible analyses: root, pattern, lemma, part of speech, prefixes, suffixes and features. Well-known examples: the BAMA/SAMA analyser, CALIMA-Star used in CAMeL Tools, and MADAMIRA.

Why do Light10 and ISRI give different results for the same word?

Because Light10 only removes affixes and keeps the stem, while ISRI tries to reach the root. For example, «المكتبات» becomes «مكتب» with Light10 and «كتب» with ISRI.

Does the lab support English stemming?

Yes, it uses a simplified rule-based stemmer inspired by Porter's basic rules to remove common suffixes such as ing, ed and s. It is for teaching purposes, not a full implementation of the Porter algorithm.

What is a morphological pattern?

A template on which a root is formed, written with ف ع ل, such as فاعل, مفعول, تفعيل and استفعال. Knowing the pattern helps determine meaning and part of speech, and algorithms such as ISRI use it.

Exercises and challenges

Beginner Hands-on in the lab

Light10 versus ISRI

Enter «المكتبات» in the morphological analysis tool. What is the Light10 result and what is the ISRI result?

Hint

Look at each algorithm's column.

Show solution

Light10: «مكتب» (removing «ال» and «ات»). ISRI: «كتب» (the root).

Beginner Computing by hand

Applying Light10 by hand

Apply Light10 by hand to «والمعلمون».

Hint

Start with the prefixes, then the suffixes.

Show solution

Removing the prefix «وال» gives «معلمون», then removing the suffix «ون» gives «معلم».

Intermediate Hands-on in the lab

Roots of present-tense verbs

Use ISRI to extract the roots of: يكتبون, استخدام, مدرسة, المعلمين.

Hint

Use comparison mode.

Show solution

كتب, خدم, درس, علم. (Matching NLTK's results.)

Intermediate Conceptual question

Stemming and retrieval

Why is light stemming preferred to root extraction in Arabic search engines?

Hint

Think of «كتاب», «مكتب» and «كاتب».

Show solution

Because a root groups words of the same root with distant meanings, which lowers precision, while light stemming only groups the forms of a single word. Experiments by Larkey and colleagues showed Light10 outperforming in retrieval.

Intermediate Hands-on in the lab

Morphological ambiguity

Load the "Ambiguous words" example and write at least two possible analyses for each word.

Hint

Add different diacritics.

Show solution

علم: عِلْم / عَلَم / عَلِمَ. ذهب: ذَهَب (metal) / ذَهَبَ (verb). وجد: وَجَدَ / وَ + جَدّ. عين: organ / spring / spy. فصل: فَصْل / فَصَلَ.

Advanced Hands-on in the lab

Weak roots

Apply ISRI to «قال، يقول، وعد، يعد، رمى». Which gave a correct root? And why do the others fail?

Hint

Notice the confidence level.

Show solution

«قال», «وعد» and «رمى» stay as they are because they are already triliteral. «يقول» gives «يقل» and «يعد» stays «يعد» (matching NLTK), while the correct roots are «قول» and «وعد». The reason is that ISRI matches surface patterns and does not restore a weak letter that was dropped or changed.

Advanced Research challenge

Evaluating a stemmer

Design an experiment to compare Light10 and ISRI in Arabic information retrieval. Which corpus and metrics are appropriate?

Hint

Look for the Arabic TREC collections.

Show solution

The Arabic TREC 2001/2002 corpus (AFP news) with its queries and relevance judgements, and the MAP and P@10 metrics, keeping the other settings fixed and testing statistical significance.

Beginner Conceptual question

Root or stem

What is the difference between the output «مكتب» and the output «كتب» for the word «المكتبات»?

Hint

Review the glossary definitions.

Show solution

«مكتب» is a stem after removing the affixes, and «كتب» is a root made of the original letters.

Intermediate Hands-on in the lab

Adding a root

Find a word that gets the "pattern" confidence in the root extractor. What must happen for it to become "dictionary"?

Hint

Dictionary confidence means the root is in the database.

Show solution

The correct root must be added to the root dictionary from the admin panel (Lexicons: root).

Related sections of the site