Arabic Spelling Correction using Supervised Learning
Paper · 2014 · Youssef Hassan, Mohamed Aly and Amir Atiya
Summary
The paper presents a system for automatic Arabic spelling correction, built for the QALB 2014 shared task on Arabic error correction. It uses the QALB corpus of manually corrected Arabic sentences and targets the four most common error types, which together account for over 90% of errors: edit, add before, merge and split. A word is flagged as wrong when the Buckwalter morphological analysis supplied by MADAMIRA finds no reading for it. Each error type then gets its own correction module:
- Edit errors: candidates within one or two edits are ranked by a Naive-Bayes classifier. Its features are a noisy-channel likelihood, SRILM n-gram scores, a POS-based collocation model and a lemma co-occurrence model.
- Add before errors: a separate contextual classifier predicts tokens that should be inserted, mostly punctuation.
- Merge and split errors: the system adds or removes spaces and ranks the resulting options by language model score.
On the development set, the combined system reaches precision 0.58, recall 0.59 and F1 0.58. On the shared task test set it scores F1 0.6, placing sixth of nine teams. This matters because Arabic has few resources for spelling correction.
Key points
- Edit errors make up more than 55% of all QALB errors, and the four targeted types together cover over 90%.
- The resources used are:
- a free Arabic wordlist of 9 million inflected forms generated from AraComLex;
- a QALB-specific MADAMIRA build based on BAMA 1.2.1;
- a trigram SRILM model with modified Kneser-Ney smoothing, trained on the Ajdir Corpora;
- an Arabic stop-word list.
- The collocation model tracks POS-tag triples around the 5,000 most frequent lemmas. The co-occurrence model, adapted from Schaback (2007), looks at lemmas within a 10-word radius.
- On the development set (M2 scorer), the system fixes 9,860 of 16,659 gold corrections while proposing 17,057, giving P 0.5781, R 0.5919 and F1 0.5849.
- Adding the add-before classifier raised recall considerably but cost precision. The authors explain this by the classifier making many wrong suggestions.
Interesting ideas
- I1. Spelling correction is framed as binary classification over generated candidates: each candidate gets a feature vector and a correct/incorrect label taken from the gold corrections. This lets channel, n-gram and contextual evidence be combined without hand-tuned weights.
- I2. A word is treated as an error exactly when the morphological analyzer cannot analyze it. This is a cheap, transparent detector that ties error flagging to an existing lexical resource.
- I3. The noisy-channel error model gives higher scores to substitutions between keys that are close on the keyboard or letters from the same confusable group. This encodes a known physical or orthographic cause of errors directly into the probabilities.
- I4. The collocation feature measures how well a word fits by counting the POS triples observed around a frequent lemma at the left, middle and right positions.
- I5. The evaluation adds modules one at a time and also tests combinations with modules removed. This exposes which component buys recall at the expense of precision.
For Mova
How these ideas could serve Mova, our small open language model — its files, stages and tests:
- I1 (tokens): A normalizer in front of the tagger could rank repair candidates for unknown words this way and keep the feature values as an explanation for each chosen fix.
- I2 (tokens): Words that crate en's morphology cannot analyze could be sent to a repair step, while analyzable words pass through unchanged and are never "corrected" behind the user's back.
- I3 (tokens): English typo repair could weight QWERTY-adjacent and homophone-like letter swaps more strongly, so that corrections reflect plausible typing slips.
- I4 (tree): Rare POS triples around a lemma could flag suspicious tagger output before parsing, pointing to likely tagging errors or misspellings that would otherwise damage the UD tree.
- I5 (learn): Mova's repair rules and pipeline stages could be ablated in the same incremental way, so each stage's net effect is measured and harmful additions are caught.
Institutions
Fields, topics and concepts
📚 Shelves 6The 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 worksSocial Sciences · 1,772 worksEducation · 203 works
🧭 Topics 2Research subjects and languages the work is about.Semitic languages · 2,908 worksGrammatical error correction & learner language · 156 works
Cite
Cite as Youssef Hassan, Mohamed Aly and Amir Atiya. 2014. Arabic Spelling Correction using Supervised Learning. Proceedings of the EMNLP 2014 Workshop on Arabic Natural Language Processing (ANLP).
@inproceedings{hassan2014arabic,
title = {{Arabic Spelling Correction using Supervised Learning}},
author = {Youssef Hassan, Mohamed Aly and Amir Atiya},
booktitle = {Proceedings of the EMNLP 2014 Workshop on Arabic Natural Language Processing (ANLP)},
year = {2014},
doi = {10.3115/v1/w14-3615},
url = {https://doi.org/10.3115/v1/w14-3615}
}References
- Tim Buckwalter. 2002. Buckwalter arabic morphological analyzer version 1.0. November. ↗
- Daniel Dahlmeier and Hwee Tou Ng. 2012. Better evaluation for grammatical error correction. In Proceedings of the 2012 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, NAACL HLT ’12, pages 568–572, Stroudsburg, PA, USA. Association for Computational Linguistics. find
- Frankie James. 2000. Modified kneser-ney smoothing of n-gram models. RIACS. find
- Mark D. Kernighan, Kenneth W. Church, and William A. Gale. 1990. A spelling correction program based on a noisy channel model. In Proceedings of the 13th Conference on Computational Linguistics - Volume 2, COLING ’90, pages 205–210, Stroudsburg, PA, USA. Association for Computational Linguistics.
- Iraky Khalifa, Zakareya Al Feki, and Abdelfatah Farawila. 2011. Arabic discourse segmentation based on rhetorical methods. find
- VI Levenshtein. 1966. Binary Codes Capable of Correcting Deletions, Insertions and Reversals. volume 10, page 707. find
- Edward Loper and Steven Bird. 2002. NLTK: The Natural Language Toolkit. ↗
- Behrang Mohit, Alla Rozovskaya, Nizar Habash, Wajdi Zaghouani, and Ossama Obeid. 2014. The First QALB Shared Task on Automatic Text Correction for Arabic. In Proceedings of EMNLP Workshop on Arabic Natural Language Processing, Doha, Qatar, October.
- Eman Othman, Khaled Shaalan, and Ahmed Rafea. 2003. A chart parser for analyzing modern standard arabic sentence. In To appear in In proceedings of the MT Summit IX Workshop on Machine Translation for Semitic Languages: Issues and Approaches, Louisiana, U.S.A.
- Pasha, Arfath, Mohamed Al-Badrashiny, Mona Diab, Ahmed El Kholy, Ramy Eskander, Nizar Habash, Manoj Pooleery, Owen Rambow, and Ryan M. Roth. 2014. Madamira: A fast, comprehensive tool for morphological analysis and disambiguation of arabic. In In Proceedings of the Language Resources and Evaluation Conference (LREC), Reykjavik, Iceland.
- Johannes Schaback. 2007. Multi-level feature extraction for spelling correction. Hyderabad, India. find
- K. Shaalan, R. Aref, and A Fahmy. 2010. An approach for analyzing and correcting spelling errors for non-native arabic learners. In Informatics and Systems (INFOS), 2010 The 7th International Conference on, pages 1–7, March. find
- Khaled Shaalan, Mohammed Attia, Pavel Pecina, Younes Samih, and Josef van Genabith. 2012. Arabic word generation and modelling for spell checking. In Nicoletta Calzolari (Conference Chair), Khalid Choukri, Thierry Declerck, Mehmet Uur Doan, Bente Maegaard, Joseph Mariani, Asuncion Moreno, Jan Odijk, and Stelios Piperidis, editors, Proceedings of the Eight International Conference on Language Resources and Evaluation (LREC’12), Istanbul, Turkey, may. European Language Resources Association (ELRA).
- A. Stolcke. 2002. Srilm – an extensible language modeling toolkit. In Proc. Intl. Conf. on Spoken Language Processing, Denver,U.S.A. find
- Wajdi Zaghouani, Behrang Mohit, Nizar Habash, Ossama Obeid, Nadi Tomeh, Alla Rozovskaya, Noura Farra, Sarah Alkuhlani, and Kemal Oflazer. 2014. Large scale arabic error annotation: Guidelines and framework. In Proceedings of the Ninth International Conference on Language Resources and Evaluation (LREC’14), Reykjavik, Iceland, May. European Language Resources Association (ELRA). ↗
Updated
This page in Markdown → https://md.research.elamur.ai/free/en/papers/hassan-2014-arabic-spelling-correction-supervised-learning/