GWU-HASP: Hybrid Arabic Spelling and Punctuation Corrector
Paper · 2014 · Mohammed Attia, Mohamed Al-Badrashiny and Mona Diab
Summary
The paper presents HASP, a system entered in the QALB shared task of 2014, which focused on correcting errors in Arabic text. It fixes three kinds of errors in Arabic text: punctuation, orthographic noise and non-word misspellings. The authors argue that these error families differ too much for one technique, so each gets its own component:
- Normalization: deterministic rules convert Hindi digits, strip kashida and speech-effect letter repetitions, and map Farsi yeh.
- Punctuation: a CRF classifier uses MADAMIRA-derived features to predict which punctuation mark should follow each word.
- Misspellings: the open-source word list AraComLex Extended detects errors, Foma generates and ranks candidates within an edit distance, and an SRILM bigram model trained on Gigaword picks the final correction.
- Spacing: a new algorithm splits merged words, and rules repair wrongly split ones.
Combining all components gave the best development F-score. On the official test set the best run scored F 62.25 under M2 evaluation and placed 5th of 9 systems. The work matters because punctuation makes up about 40% of the QALB errors. The authors believe HASP is the first corrector to address punctuation at all.
Key points
- In the QALB data, punctuation accounts for roughly 40% of errors, compared with only 4% in the CoNLL 2013 English GEC data. In comparable Gigaword corpora, punctuation tokens make up 10% of English text but only 3% of Arabic text.
- The CRF++ classifier clearly beat SVM (Yamcha) for punctuation. With a window of 5 and clitic-stripped stems, CRF reached F 55.99 against 46.37 for SVM.
- AraComLex Extended was cleaned using the training data: 776 valid words were added and 4,810 misspellings removed. Non-word detection then reached F 97.36 on the development set.
- In the training data, 85.12% of split-word errors involve a detached conjunction waw. Soft orthographic variants such as hamza forms, taa marboutah and alif maqsoura make up over 62% of misspellings.
- Character-level correction with Giza++ alignment was a preliminary experiment. Even with CRF punctuation and normalization added, it reached only F 52.90, against 61.59 for the Dictionary-LM pipeline.
Interesting ideas
- I1. Each error family is handled by the cheapest method that suits it: regex rules, a sequence classifier, or a lexicon plus language model. Independent modules make it easy to see which component causes a given gain or failure.
- I2. Punctuation restoration is framed as tagging every word with the mark that should follow it, or none. This turns an insertion problem into ordinary sequence labeling.
- I3. Merge splitting assumes every word has a minimum length, which keeps the candidate set small but still broad. The data also showed that one split covers almost all real cases, and the simpler one-space algorithm scored marginally better.
- I4. Edit-distance rankings, weighted by the error types seen in the data, are converted into probabilities. These are fed to the language model with forward-backward decoding instead of uniform Viterbi.
- I5. The lexicon itself is audited against annotated training data, by adding valid words and removing misspellings stored as entries.
For Mova
How these ideas could serve Mova, our small open language model — its files, stages and tests:
- I1 (tokens): The en crate could route noisy-text repairs such as elongations, digit variants and spacing faults to small dedicated passes before tagging, each pass logging what it changed.
- I2 (tokens): Unpunctuated input such as transcripts or chat could get sentence boundaries restored as a per-token tag before UD parsing, which keeps the boundary decision inspectable.
- I3 (tokens): When repairing glued words, the tokenizer could generate a small lexicon-checked set of single-split candidates rather than every segmentation.
- I4 (learn): Witness parsers or repair rules could pass calibrated confidence scores, not bare candidate lists, to whichever component makes the final choice.
- I5 (world): WordNet- or Wikidata-derived word lists in the compiled knowledge could be periodically checked against gold corpora to remove entries that silently accept errors.
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 1Research subjects and languages the work is about.Semitic languages · 2,908 works
Cite
Cite as Mohammed Attia, Mohamed Al-Badrashiny and Mona Diab. 2014. GWU-HASP: Hybrid Arabic Spelling and Punctuation Corrector. Proceedings of the EMNLP 2014 Workshop on Arabic Natural Language Processing (ANLP).
@inproceedings{attia2014gwu,
title = {{GWU-HASP: Hybrid Arabic Spelling and Punctuation Corrector}},
author = {Mohammed Attia, Mohamed Al-Badrashiny and Mona Diab},
booktitle = {Proceedings of the EMNLP 2014 Workshop on Arabic Natural Language Processing (ANLP)},
year = {2014},
doi = {10.3115/v1/w14-3620},
url = {https://doi.org/10.3115/v1/w14-3620}
}References
- Alfaifi, A., and Atwell, E. (2012) Arabic Learner Corpora (ALC): a taxonomy of coding errors. In Proceedings of the 8th International Computing Conference in Arabic (ICCA 2012), Cairo, Egypt. ↗
- Alkanhal, Mohamed I., Mohamed A. Al-Badrashiny, Mansour M. Alghamdi, and Abdulaziz O. Al-Qabbany. (2012) Automatic Stochastic Arabic Spelling Correction With Emphasis on Space Insertions and Deletions. IEEE Transactions on Audio, Speech, and Language Processing, Vol. 20, No. 7, September 2012. ↗
- Alqinai, Jamal. (2013) Mediating punctuation in English Arabic translation. Linguistica Atlantica. Vol. 32. find
- Attia, M., Pecina, P., Tounsi, L., Toral, A., and van Genabith, J. (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.
- Attia, Mohammed, Pavel Pecina, Younes Samih, Khaled Shaalan, Josef van Genabith. 2012. Improved Spelling Error Detection and Correction for Arabic. COLING 2012, Bumbai, India.
- Beesley, Kenneth R. (1998). Arabic Morphology Using Only Finite-State Operations. In The Workshop on Computational Approaches to Semitic languages, Montreal, Quebec, pp. 50–57.
- 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, Vol. 2773, pp.770–777. find
- Brill, Eric and Moore, Robert C. (2000) An improved error model for noisy channel spelling correction. Proceedings of the 38th Annual Meeting of the Association for Computational Linguistics, Hong Kong, pp. 286–293.
- Brown, P. F., Della Pietra, V. J., de Souza, P. V., Lai, J. C. and Mercer, R. L. (1992) Class-Based n-gram Models of Natural Language. Computational Linguistics, 18(4), 467–479. ↗
- Buckwalter, T. (2004b) Buckwalter Arabic Morphological Analyzer (BAMA) Version 2.0. Linguistic Data Consortium (LDC) catalogue number: LDC2004L02, ISBN1-58563-324-0. find
- Buckwalter, Tim. (2004a) Issues in Arabic orthography and morphology analysis. Proceedings of the Workshop on Computational Approaches to Arabic Script-based Languages. Pages 31-34. Association for Computational Linguistics Stroudsburg, PA, USA.
- Church, Kenneth W. and William A. Gale. (1991) Probability scoring for spelling correction. Statistics and Computing, 1, pp. 93–103. ↗
- Dahlmeier, Daniel and Ng, Hwee Tou. 2012. Better evaluation for grammatical error correction. In Proceedings of NAACL. find
- Damerau, Fred J. (1964) A Technique for Computer Detection and Correction of Spelling Errors. Communications of the ACM, Volum 7, issue 3, pp. 171–176. ↗
- Gao, Jianfeng, Xiaolong Li, Daniel Micol, Chris Quirk, and Xu Sun. (2010) A large scale ranker-based system for search query spelling correction. Proceedings of the 23rd International Conference on Computational Linguistics (COLING 2010), pages 358–366, Beijing, China Golding, Andrew R. A Bayesian Hybrid Method for Context-sensitive Spelling Correction. In Proceedings of the Third Workshop on Very Large Corpora. find
- MIT, Cambridge, Massachusetts, USA. 1995, pp.39–53. find
- Golding, Andrew R., and Dan Roth. (1996) Applying Winnow to Context-Sensitive Spelling Correction. In Proceedings of the Thirteenth International Conference on Machine Learning, Stroudsburg, PA, USA, pp. 182–190 ↗
- Habash, Nizar Y. (2010) Introduction to Arabic Natural Language Processing. Synthesis Lectures on Human Language Technologies 3.1: 1-187. ↗
- Haddad, B., and Yaseen, M. (2007) Detection and Correction of Non-Words in Arabic: A Hybrid Approach. International Journal of Computer Processing of Oriental Languages. Vol. 20, No. 4. ↗
- Han, Bo and Timothy Baldwin. (2011) Lexical Normalisation of Short Text Messages: Makn Sens a #twitter. Proceedings of the 49th Annual Meeting of the Association for Computational Linguistics, pages 368–378, Portland, Oregon, June 19-24, 2011
- Hassan, A, Noeman, S., and Hassan, H. (2008) Language Independent Text Correction using Finite State Automata. IJCNLP. Hyderabad, India. find
- Hulden, M. (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 Islam, Aminul, Diana Inkpen. (2009) Real-Word Spelling Correction using Google Web 1T n-gram with Backoff. International Conference on Natural Language Processing and Knowledge Engineering, Dalian, China, pp. 1–8. find
- Kiraz, G. A. (2001) Computational Nonlinear Morphology: With Emphasis on Semitic Languages. Cambridge University Press. find
- Kudo, Taku, Yuji Matsumoto. (2003) Fast Methods for Kernel-Based Text Analysis. 41st Annual Meeting of the Association for Computational Linguistics (ACL-2003), Sapporo, Japan.
- Kukich, Karen. (1992) Techniques for automatically correcting words in text. Computing Surveys, 24(4), pp. 377–439. ↗
- Lafferty, John, Andrew McCallum, and Fernando Pereira. (2001) Conditional random fields: Probabilistic models for segmenting and labeling sequence data, In Proceedings of the International Conference on Machine Learning (ICML 2001), , MA, USA, pp. 282-289. find
- Levenshtein, V. I. (1966) Binary codes capable of correcting deletions, insertions, and reversals. In: Soviet Physics Doklady, pp. 707-710. find
- Magdy, W., and Darwish, K. (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.
- Mohit, Behrang, 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.
- Ng, Hwee Tou, Siew Mei Wu, Yuanbin Wu, Christian Hadiwinoto, and Joel Tetreault. (2013) The CoNLL-2013 Shared Task on Grammatical Error Correction. Proceedings of the Seventeenth Conference on Computational Natural Language Learning: Shared Task, pages 1–12, Sofia, Bulgaria, August 8-9 2013. find
- Norvig, P. (2009) Natural language corpus data. In Beautiful Data, edited by Toby Segaran and Jeff Hammerbacher, pp. 219-“-242. Sebastopol, Calif.: O'Reilly. find
- Och, Franz Josef, Hermann Ney. (2003) A Systematic Comparison of Various Statistical Alignment Models. In Computational Linguistics, volume 29, number 1, pp. 19-51 March 2003. ↗
- Parker, R., Graff, D., Chen, K., Kong, J., and Maeda, K. (2009) Arabic Gigaword Fifth Edition. LDC Catalog No.: LDC2009T30, ISBN: 1-58563-532-4. find
- Parker, R., Graff, D., Chen, K., Kong, J., and Maeda, K. (2011) Arabic Gigaword Fifth Edition. LDC Catalog No.: LDC2011T11, ISBN: 1-58563-595-2. find
- Pasha, Arfath, Mohamed Al-Badrashiny, Ahmed El Kholy, Ramy Eskander, Mona Diab, Nizar Habash, Manoj Pooleery, Owen Rambow, Ryan Roth. (2014) Madamira: A fast, comprehensive tool for morphological analysis and disambiguation of Arabic. In Proceedings of the 9th International Conference on Language Resources and Evaluation, Reykjavik, Iceland.
- Ratcliffe, Robert R. (1998) The Broken Plural Problem in Arabic and Comparative Semitic: Allomorphy and Analogy in Non-concatenative Morphology. Amsterdam studies in the theory and history of linguistic science. Series IV, Current issues in linguistic theory ; v. 168. Amsterdam ; Philadelphia: J. Benjamins. find
- Roth, R. Rambow, O., Habash, N., Diab, M., and Rudin, C. (2008) Arabic Morphological Tagging, Diacritization, and Lemmatization Using Lexeme Models and Feature Ranking. Proceedings of ACL-08: HLT, Short Papers, pp. 117–120.
- Shaalan, K., Samih, Y., Attia, M., Pecina, P., and van Genabith, J. (2012) Arabic Word Generation and Modelling for Spell Checking. Language Resources and Evaluation (LREC). Istanbul, Turkey. pp. 719–725.
- Stolcke, A., Zheng, J., Wang, W., and Abrash, V. (2011) SRILM at sixteen: Update and outlook. in Proc. IEEE Automatic Speech Recognition and Understanding Workshop. Waikoloa, Hawaii. find
- van Delden, Sebastian, David B. Bracewell, and Fernando Gomez. (2004) Supervised and Unsupervised Automatic Spelling Correction Algorithms. In proceeding of Information Reuse and Integration (IRI). Proceedings of the 2004 IEEE International Conference on Web Services, pp. 530–535. find
- Wu, Jian-cheng, Hsun-wen Chiu, and Jason S. Chang. (2013) Integrating Dictionary and Web N-grams for Chinese Spell Checking. Computational Linguistics and Chinese Language Processing. Vol. 18, No. 4, December 2013, pp. 17–30. find
- Zaghouani, Wajdi, 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. ↗
Updated
This page in Markdown → https://md.research.elamur.ai/free/en/papers/attia-2014-gwu-hasp-hybrid-arabic-spelling/