Elamur Research⌕
☰
home / papers / 2012 / Arabic Word Generation and Modelling for Spell Checking

Arabic Word Generation and Modelling for Spell Checking

Paper · 2012 · Khaled Shaalan, Mohammed Attia, Pavel Pecina et al.

Summary

The paper addresses the lack of an adequate open-source spell-checking lexicon for Arabic. Existing free resources such as Ayaspell (about 300K forms) and Arabic-Spell (about 900K forms) cover only a small part of the language's highly productive inflection and cliticization. The authors used the open-source finite-state morphological transducer AraComLex in generation mode to enumerate roughly 13 million surface forms. They filtered these, together with other word lists, through the Microsoft Spell Checker, which produced "AraComLex Extended", a list of about 9.3 million accepted words released under GPLv3.

The accepted and rejected forms then served as training data for two character-level tri-gram models, one for valid words and one for invalid ones. Comparing the two gives an error detector for words not in the list, reported at 98.2% precision at full recall.

For correction, the system combines finite-state edit-distance candidate search, Noisy Channel ranking, Arabic-specific letter-confusion costs and rules for splitting merged words. It clearly beats Hunspell but stays below MS Spell Checker. The work matters because it supplies a large free lexicon and a detector that generalizes beyond any fixed list.

Key points

  • AraComLex (30,587 lemmas) generated 12,951,042 forms. MS Spell Checker accepted 8,783,858 of them (68%). The merged, deduplicated list has 9,306,138 accepted words, and 5,841,061 forms were rejected.
  • On a 400,000-word news test set kept separate from Gigaword, AraComLex Extended scored 0.9840 coverage, 0.9998 accuracy and 0.9999 f-measure. Ayaspell's 292,464-word list scored 0.5529 coverage.
  • Detection uses two character tri-gram models built with SRILM. The abstract reports 98.2% precision at 100% recall, while the introduction gives 97%.
  • First-choice correction accuracy on 1,799 misspelled words:
    • MS Spell Checker: 80.54%
    • Hunspell with Ayaspell: 45.64%
    • edit distance plus Noisy Channel: 68.2%
    • with added heuristics: 71.3%
    • with post-processing of unknown words: 75%
  • Of 227 words that received no candidates, 63% were two or more words run together. Regex rules targeting 7 frequent particles and words fixed 102 of the 105 affected cases.

Interesting ideas

  • I1. Instead of collecting attested words from a corpus, run a bidirectional morphological analyser backwards to enumerate every form it licenses, then filter the output with an external judge; this finds forms no corpus contains.
  • I2. Train one character n-gram model on accepted forms and another on rejected forms, then classify a new word by which model scores it higher; this captures legal letter clusters without needing an explicit rule for each constraint.
  • I3. Lower the edit cost for substitutions within known confusion groups of letters, so that the ranking reflects real error patterns rather than treating every letter change as equal.
  • I4. Scale the allowed number of edits with word length, setting the threshold from the corpus distribution of word lengths, so short words are not over-corrected and long words are not under-corrected.
  • I5. Examine the cases where no candidates are produced; many turned out to be merged words that a few split rules repair, which shows that diagnosing failure classes can pay off more than tuning the ranker.

For Mova

How these ideas could serve Mova, our small open language model — its files, stages and tests:

  • I1 (tokens): Generating all inflections from the crate en lemma lexicon would give a closed list of valid forms to check the tagger and lemmatizer against.
  • I2 (tokens): A valid-versus-invalid character model could flag unknown tokens as likely typos or as plausible new words before morphology tries to analyse them.
  • I3 (learn): Self-induced repair rules could weight candidate fixes by observed confusion classes, such as frequent tag or attachment swaps, rather than by flat counts.
  • I4 (tokens): Tokenizer normalisation could use length-dependent edit budgets when mapping noisy tokens to lexicon entries.
  • I5 (learn): Evaluation could routinely group zero-output parser and reader failures into classes, so that cheap targeted rules are written before any retraining.

Our summary of the paper, in our own words — not its text. The work belongs to its authors; read it at the links above.

 Institutions

 Fields, topics and concepts

Cite

Cite as Khaled Shaalan, Mohammed Attia, Pavel Pecina, Younes Samih and Josef van Genabith. 2012. Arabic Word Generation and Modelling for Spell Checking. Proceedings of the Eighth International Conference on Language Resources and Evaluation (LREC'12).

The paper itself, not this page. BibTeX from the library's record of the work.

@inproceedings{shaalan2012arabic,
  title = {{Arabic Word Generation and Modelling for Spell Checking}},
  author = {Khaled Shaalan, Mohammed Attia, Pavel Pecina, Younes Samih and Josef {van Genabith}},
  booktitle = {Proceedings of the Eighth International Conference on Language Resources and Evaluation (LREC'12)},
  year = {2012},
  doi = {10.63317/4c4ivvhra629},
  url = {https://doi.org/10.63317/4c4ivvhra629}
}

References

16 references, 4 of them with a card of ours. ↗ leads to the work, «find» searches for one we have no id for yet.

  1. Attia, Mohammed, Pavel Pecina, Lamia Tounsi, Antonio Toral, Josef van Genabith. (2011). An Open-Source Finite State Morphological Transducer for Modern Standard Arabic. International Workshop on Finite State Methods and Natural Language Processing (FSMNLP). Blois, France.
  2. Beesley, K. R., and Karttunen, L. (2003). Finite State Morphology: CSLI studies in computational linguistics. Stanford, Calif.: CSLI. find
  3. Ben Othmane Zribi C. and Ben Ahmed M., Efficient Automatic Correction of Misspelled Arabic Words Based on Contextual Information, Lecture Notes in Computer Science, (Springer, 2003), Vol. 2773, pp.770–777. find
  4. Brill, Eric and Robert C. Moore. 2000. An improved error model for noisy channel spelling correction. ACL '00 Proceedings of the 38th Annual Meeting on Association for Computational Linguistics.
  5. Choudhury, Monojit, Rahul Saraf, Vijit Jain, Animesh Mukherjee, Sudeshna Sarkar and Anupam Basu. 2007. Investigation and modeling of the structure of texting language. International Journal on Document Analysis and Recognition. Volume 10, Numbers 3-4, 157-174, DOI: 10.1007/s10032-007-0054-0 ↗
  6. Davis, Clodoveu A., Emerson de Salles. (2007). Approximate String Matching for Geographic Names and Personal Names. In Proceedings of GeoInfo'2007. pp.49-60. find
  7. Hajič, J., Smrž, O., Buckwalter, T., and Jin, H. (2005). Feature-Based Tagger of Approximations of Functional Arabic Morphology. In: The 4th Workshop on Treebanks and Linguistic Theories (TLT 2005), Barcelona, Spain. find
  8. Hassan, Ahmed, Sara Noeman and Hany Hassan. (2008). Language Independent Text Correction using Finite State Automata. IJCNLP. find
  9. Hyderabad, India Hulden, Mans. (2009). Fast Approximate String Matching with Finite Automata. Proceedings of SEPLN. find
  10. Hulden, Mans. (2009). Foma: a Finite-state compiler and library. EACL '09 Proceedings of the 12th Conference of the European Chapter of the Association for Computational Linguistics. Association for Computational Linguistics Stroudsburg, PA, USA Kernigan, M., Church, K., Gale W. (1990). A Spelling Correction Program Based on a Noisy Channel Model. AT & T Laboratories, 600 Mountain Ave., Murray Hill, NJ.
  11. Kiraz, G. A. (2001). Computational Nonlinear Morphology: With Emphasis on Semitic Languages. Cambridge University Press. find
  12. Levenshtein, V. I. (1966). Binary codes capable of correcting deletions, insertions, and reversals. In: Soviet Physics Doklady, pp. 707-710. find
  13. Magdy, Walid and Kareem Darwish. (2006). Arabic OCR error correction using character segment correction, language modeling, and shallow morphology. EMNLP '06 Proceedings of the 2006 Conference on Empirical Methods in Natural Language Processing.
  14. Mitton, Roger (1996). English spelling and the computer. Harlow, Essex: Longman Group Oflazer, K. (1996) Error-tolerant finite-state recognition with applications to morphological analysis and spelling correction. Computational Linguistics 22(1): 73-90 find
  15. Watson, J. (2002). The Phonology and Morphology of Arabic, New York: Oxford University Press. find
  16. Wintner, Shuly. (2008). Strengths and weaknesses of finite-state technology: a case study in morphological grammar development Natural Language Engineering 14(4):457-469, October 2008. find

Updated

↑ back to top

This page in Markdown → https://md.research.elamur.ai/free/en/papers/shaalan-2012-arabic-word-generation-modelling-spell/