Elamur Research⌕
☰
home / papers / 2012 / Improved Spelling Error Detection and Correction for Arabic

Improved Spelling Error Detection and Correction for Arabic

Paper · 2012 · Mohammed Attia, Pavel Pecina, Younes Samih et al.

Summary

The paper builds a better spell checker and corrector for Modern Standard Arabic, handling non-word errors only. The authors argue that such a system depends on three components (a lexicon of valid words, a model of how errors arise, and a model of the language) and that improving each one adds to the overall gain. For the word list, they extend AraComLex Extended by checking it against the Arabic Gigaword corpus. Unseen words are verified with the Buckwalter analyser and then reviewed by hand, giving 9.3 million inflected word types. For the error model, they study naturally occurring errors and give lower edit costs to the Arabic letter confusions that occur most often. They also add a module that splits words accidentally run together. For the language model, they compare bigram models trained on clean, noisy and very large data. On 2,027 real errors with gold corrections, the best setup picks the right correction first 82.86% of the time, well above MS Word 2010, Ayaspell and Google Docs. The work shows that limiting the number of candidates and choosing training data carefully matter as much as the language model itself.

Key points

  • The dictionary holds about 9.3M fully inflected word types, built from the AraComLex finite-state generator, Gigaword and the Buckwalter Arabic Morphological Analyser. It is stored as a finite-state automaton for compact lookup.
  • Candidates are generated with foma at Levenshtein distance 1–2. This is brute force: a 6-letter word yields around 469 raw candidates before dictionary filtering.
  • Confusions involving hamzah forms, yaa vs. alif maqsoura, and taa marboutah vs. haa cause most errors. Run-on words make up 16% of errors.
  • The test set has 400,000 tokens of web news with 2,027 natural errors. First-choice accuracy on tokens was:
    • Google Docs: 9.32%
    • Ayaspell: 41.86%
    • MS Word 2010: 57.15%
    • This system (Gigaword bigram LM, 3 candidates, split-word module): 82.86%
  • With training sets of similar size, clean Al-Jazeera data reached 80.97% while noisy AFP data reached 73.93%. The much larger Gigaword corpus did best despite moderate noise. Accuracy fell both above about 10 candidates and at only 2.

Interesting ideas

  • I1. The best number of candidates to pass downstream is a middle value: generating more candidates raises the chance the right one is included, but it makes the final selector less accurate. Tuning this cut-off is a cheap and effective lever.
  • I2. The edit costs are learned from real error patterns: costs are lowered for character pairs that people actually confuse, which turns a uniform distance into a ranker informed by the error data.
  • I3. Run-on words are handled by a separate component, because plain edit distance cannot model a missing space well. Splitting them out avoids distorting the main model.
  • I4. Before training, each data source is profiled for noise, which shows that clean data beats noisy data of similar size, while a much larger corpus can make up for noise.
  • I5. The word list is expanded by taking corpus words missing from the lexicon and confirming them with a second, independent analyser, with humans reviewing only the cases where the two disagree.

For Mova

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

  • I1 (tree): The beam or k-best width passed from tagger to parser could be tuned the same way, sweeping k and measuring LAS instead of assuming wider is better.
  • I2 (tokens): A typo-normalisation step before tagging could weight English confusions (e.g., doubled letters, ie/ei swaps) from observed errors, so lemma lookup finds the intended word first.
  • I3 (tokens): The tokenizer could have a dedicated, explainable split rule for glued words that is checked against the lexicon, rather than leaving them to unknown-word fallbacks.
  • I4 (learn): Silver data could be scored for noise by its source, such as the rate of disagreement among witness parsers, and the noisiest sources dropped unless their volume is far greater.
  • I5 (world): Additions to the ontology or lexicon mined from text could be accepted only when two independent sources agree, such as WordNet and Wikidata, with disagreements queued for manual review.

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

📚 Shelves 4The field of science this work belongs to (OpenAlex fields).Computer Science · 16,667 worksArtificial Intelligence · 16,194 worksArts and Humanities · 16,039 worksLanguage and Linguistics · 15,891 works

🧭 Topics 1Research subjects and languages the work is about.Semitic languages · 2,908 works

Cite

Cite as Mohammed Attia, Pavel Pecina, Younes Samih, Khaled Shaalan and Josef van Genabith. 2012. Improved Spelling Error Detection and Correction for Arabic. Proceedings of COLING 2012: Posters.

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

@inproceedings{attia2012improved,
  title = {{Improved Spelling Error Detection and Correction for Arabic}},
  author = {Mohammed Attia, Pavel Pecina, Younes Samih, Khaled Shaalan and Josef {van Genabith}},
  booktitle = {Proceedings of COLING 2012: Posters},
  year = {2012},
  url = {https://aclanthology.org/C12-2011/}
}

References

24 references, 7 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. (2003). 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. Brown, P. F., V. J. Della Pietra, P. V. deSouza, J. C. Lai and R. L. Mercer. (1992). Class-Based n-gram Models of Natural Language, ' Computational Linguistics 18(4), 467-479. find
  6. Buckwalter, T. (2004). Buckwalter Arabic Morphological Analyzer (BAMA) Version 2.0. Linguistic Data Consortium (LDC) catalogue number: LDC2004L02, ISBN1-58563- 324-0 find
  7. 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 ↗
  8. Haddad, Bassam and Mustafa Yaseen. (2007). Detection and Correction of Non-Words in Arabic: A Hybrid Approach. International Journal of Computer Processing of Oriental Languages. Vol. 20, No. 4 ↗
  9. 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
  10. Habash, Nizar and Rambow, Owen. (2005). Arabic Tokenization, Part-of-Speech Tagging and Morphological Disambiguation in One Fell Swoop. Proceedings of the 43rd Annual Meeting of the Association for Computational Linguistics (ACL'05), pp. 573—580
  11. Hassan, Ahmed, Sara Noeman and Hany Hassan. (2008). Language Independent Text Correction using Finite State Automata. IJCNLP. find
  12. Hyderabad, India Hulden, Mans. (2009a). Fast Approximate String Matching with Finite Automata. Proceedings of the 25th Conference of the Spanish Society for Natural Language Processing (SEPLN). find
  13. Hulden, Mans. (2009b). 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.
  14. Kiraz, G. A. (2001). Computational Nonlinear Morphology: With Emphasis on Semitic Languages. Cambridge University Press. find
  15. Levenshtein, V. I. (1966). Binary codes capable of correcting deletions, insertions, and reversals. In: Soviet Physics Doklady, pp. 707-710. find
  16. 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.
  17. Mitton, Roger (1996). English spelling and the computer. Harlow, Essex: Longman Group Norvig, Peter. (2009). Natural language corpus data. In Beautiful Data, edited by Toby Segaran and Jeff Hammerbacher, pp. 219–242. Sebastopol, Calif.: O'Reilly Oflazer, K. (1996) Error-tolerant finite-state recognition with applications to morphological analysis and spelling correction. Computational Linguistics 22(1): 73-90 find
  18. Parker, Robert, David Graff, Ke Chen, Junbo Kong, and Kazuaki Maeda. (2011). Arabic Gigaword Fifth Edition. LDC Catalog No.: LDC2011T11, ISBN: 1-58563-595-2. ↗
  19. Roth, Ryan and Rambow, Owen and Habash, Nizar and Diab, Mona and Rudin, Cynthia. (2008). Arabic Morphological Tagging, Diacritization, and Lemmatization Using Lexeme Models and Feature Ranking. Proceedings of ACL-08: HLT, Short Papers, pp. 117–120.
  20. Shaalan, Khaled,Younes Samih, Mohammed Attia, Pavel Pecina, and Josef van Genabith. (2012). Arabic Word Generation and Modelling for Spell Checking. Language Resources and Evaluation (LREC). Istanbul, Turkey. Pages: 719-725
  21. Shaalan K., Allam A., Gomah A. (2003). Towards Automatic Spell Checking for Arabic, In Proceedings of the 4th Conference on Language Engineering, Egyptian Society of Language Engineering (ELSE), PP. 240-247, Oct. 21-22, Cairo, Egypt. find
  22. Stolcke, A., J. Zheng, W. Wang, and V. Abrash, (2011). SRILM at sixteen: Update and outlook. in Proc. IEEE Automatic Speech Recognition and Understanding Workshop. Waikoloa, Hawaii. find
  23. Watson, J. (2002). The Phonology and Morphology of Arabic, New York: Oxford University Press. find
  24. 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/attia-2012-improved-spelling-error-detection-correction/