Elamur Research⌕
☰
home / papers / 2020 / CAMeL Tools: An Open Source Python Toolkit for Arabic Natural Language Processing

CAMeL Tools: An Open Source Python Toolkit for Arabic Natural Language Processing

Summary

Arabic NLP resources are fragmented. Existing tools usually target a single variety, most often MSA and occasionally Egyptian. They are also written in different programming languages, expose different interfaces and data formats, and come under different licensing terms, so combining them in one application is hard. The CAMeL Lab at NYU Abu Dhabi addresses this with CAMeL Tools, an open-source Python package with both a command-line interface and a programmatic API. It brings together:

  • text pre-processing,
  • morphological analysis and disambiguation, which also yields POS tags, diacritization, tokenization and lemmas,
  • named entity recognition,
  • sentiment analysis,
  • dialect identification.

Parsing is announced as work in progress. The authors justify the design by Arabic's particular difficulties: omitted diacritics, dense inflection and clitics, large gaps between dialects, and noisy spelling. They compare the toolkit with MADAMIRA, Farasa and Stanford CoreNLP and argue that it covers more functionality in one Python package. The paper matters because it offers a single open entry point for both MSA and dialectal processing. The excerpt provided here omits the component sections, so this summary does not report evaluation figures for individual components.

Key points

  • Comparison with existing suites (Table 2):
    • MADAMIRA is a Java system built around its morphological analyzer and supports MSA and Egyptian.
    • Farasa is a set of separate Java tools for MSA.
    • Stanford CoreNLP is multilingual Java with Python bindings, and its Arabic NER is regex-based.
  • Motivating numbers:
    • An MSA verb can have more than 5,400 forms.
    • An MSA morphological disambiguator reaches about 72% POS accuracy on Gulf Arabic, versus 96% on MSA.
    • About 32% of words in online MSA comments contain spelling errors.
    • One Egyptian word was found written in 27 different ways.
  • NER: The system is trained on all publicly available data and benchmarked against Benajiba and Rosso (2008). ANERcorp and ANERgazet are the standard resources in this area.
  • Dialect identification: The output is a probability distribution over city-level dialects plus MSA. In the example, an Egyptian tweet gets Cairo at 95.0%. The training data differs from the VarDial shared-task data in genre, size and dialect coverage.
  • Running example (Table 1): One Egyptian tweet is passed through every component, showing three competing analyses of a single word (frStnA).

Interesting ideas

  • I1. One running example in a single table: Showing one input sentence processed by every module is a compact way to document a pipeline. Users immediately see what each component adds, which would suit documentation for any multi-module toolkit.
  • I2. Analysis separated from disambiguation: The analyzer lists every possible reading (lemma, gloss, POS, dialect, tokenization), and a separate step picks the right one. Keeping ambiguity explicit until the final choice is valuable for any morphologically rich language, including Ukrainian.
  • I3. Measuring cross-variety degradation: Running a standard-variety tool on a dialect and reporting the accuracy drop (96% to 72%) gives a concrete case for variety-specific models. The same check could be applied to regional or mixed language varieties elsewhere.
  • I4. A spelling convention as normalization target: CODA gives noisy, non-standard dialect writing a consistent target spelling. This approach transfers to any language where informal online text lacks a fixed orthography.
  • I5. Feature-coverage matrix: Comparing toolkits on interface types, implementation language and supported tasks is a simple, reusable way to position a new resource against existing ones.

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

Fields: Linguistics & languages

Topics: Named entity recognition

Cited by

159 papers of our library cite it (of the 140673 whose bibliographies we read); 25 of them have a page here, 134 not yet.

Cite

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

@inproceedings{obeid2020camel,
  title = {{CAMeL Tools: An Open Source Python Toolkit for Arabic Natural Language Processing}},
  author = {Obeid, Ossama and Zalmout, Nasser and Khalifa, Salam and Taji, Dima and Oudah, Mai and Alhafni, Bashar and Inoue, Go and Eryani, Fadhl and Erdmann, Alexander and Habash, Nizar},
  booktitle = {Proceedings of the Twelfth Language Resources and Evaluation Conference},
  year = {2020},
  url = {https://aclanthology.org/2020.lrec-1.868/}
}

References

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

  1. Abdelali, A., Darwish, K., Durrani, N., and Mubarak, H. (2016). Farasa: A fast and furious segmenter for Arabic. In Proceedings of the Conference of the North American Chapter of the Association for Computational Linguistics (NAACL), pages 11–16, San Diego, California. find our card
  2. AbdelRahman, S., Elarnaoty, M., Magdy, M., and Fahmy, A. (2010). Integrated machine learning techniques for Arabic named entity recognition. International Journal of Computer Science Issues (IJCSI), 7:27–36. find
  3. Abdul-Mageed, M. and Diab, M. (2014). SANA: A large scale multi-genre, multi-dialect lexicon for Arabic subjectivity and sentiment analysis. In Proceedings of the Language Resources and Evaluation Conference (LREC), pages 1162–1169, Reykjavik, Iceland. find
  4. Aboaoga, M. and Aziz, M. J. A. (2013). Arabic person names recognition by using a rule based approach. Journal of Computer Science, 9:922–927. ↗
  5. Abu Farha, I. and Magdy, W. (2019). Mazajak: An online Arabic sentiment analyser. In Proceedings of the Fourth Arabic Natural Language Processing Workshop, pages 192–198, Florence, Italy, August. Association for Computational Linguistics. find
  6. Al-Badrashiny, M., Eskander, R., Habash, N., and Rambow, O. (2014). Automatic transliteration of romanized Dialectal Arabic. In Proceedings of the Conference on Computational Natural Language Learning (CoNLL), pages 30–38, Ann Arbor, Michigan. find
  7. Alkuhlani, S. and Habash, N. (2011). A Corpus for Modeling Morpho-Syntactic Agreement in Arabic: Gender, Number and Rationality. In Proceedings of the Conference of the Association for Computational Linguistics (ACL), Portland, Oregon, USA. find our card
  8. Antoun, W., Baly, F., and Hajj, H. (2020). AraBERT: Transformer-based model for Arabic language understanding. ↗ our card
  9. Badaro, G., Baly, R., Hajj, H., Habash, N., and El-Hajj, W. (2014). A large scale Arabic sentiment lexicon for Arabic opinion mining. In Proceedings of the Workshop for Arabic Natural Language Processing (WANLP), pages 165–173, Doha, Qatar. find
  10. Badaro, G., El Jundi, O., Khaddaj, A., Maarouf, A., Kain, R., Hajj, H., and El-Hajj, W. (2018). EMA at SemEval-2018 task 1: Emotion mining for Arabic. In Proceedings of The 12th International Workshop on Semantic Evaluation, pages 236–244, New Orleans, Louisiana, June. Association for Computational Linguistics. find
  11. Baly, R., Hajj, H., Habash, N., Shaban, K. B., and El-Hajj, W. (2017). A sentiment treebank and morphologically enriched recursive deep models for effective sentiment analysis in Arabic. ACM Transactions on Asian and Low-Resource Language Information Processing (TAL-LIP), 16(4):23. ↗
  12. Baly, R., Khaddaj, A., Hajj, H., El-Hajj, W., and Shaban, K. B. (2019). ArSentD-LEV: A multi-topic corpus for target-based sentiment analysis in Arabic Levantine tweets. ↗
  13. Beesley, K., Buckwalter, T., and Newton, S. (1989). Two-Level Finite-State Analysis of Arabic Morphology. In Proceedings of the Seminar on Bilingual Computing in Arabic and English. find
  14. Beesley, K. (1996). Arabic Finite-State Morphological Analysis and Generation. In Proceedings of the International Conference on Computational Linguistics (COL-ING), pages 89–94, Copenhagen, Denmark. find
  15. Benajiba, Y. and Rosso, P. (2007). ANERsys 2.0: Conquering the ner task for the Arabic language by combining the maximum entropy with pos-tag information. In Proceedings of workshop on natural language-independent engineering, 3rd Indian international conference on artificial intelligence (IICAI-2007), pages 1814–1823. find
  16. Benajiba, Y. and Rosso, P. (2008). Arabic Named Entity Recognition using Conditional Random Fields. In Proceedings of workshop on HLT NLP within the Arabic world (LREC). find
  17. Benajiba, Y., Rosso, P., and Benedí Ruiz, J. M. (2007). ANERsys: An Arabic Named Entity Recognition System Based on Maximum Entropy. In Alexander Gelbukh, editor, Computational Linguistics and Intelligent Text Processing, pages 143–153, Berlin, Heidelberg. Springer Berlin Heidelberg. find
  18. Bouamor, H., Habash, N., Salameh, M., Zaghouani, W., Rambow, O., Abdulrahim, D., Obeid, O., Khalifa, S., Eryani, F., Erdmann, A., and Oflazer, K. (2018). The MADAR Arabic Dialect Corpus and Lexicon. In Proceedings of the Language Resources and Evaluation Conference (LREC), Miyazaki, Japan. find
  19. Boudchiche, M., Mazroui, A., Bebah, M. O. A. O., Lakhouaja, A., and Boudlal, A. (2017). AlKhalil Morpho Sys 2: A robust Arabic morpho-syntactic analyzer. Journal of King Saud University - Computer and Information Sciences, 29(2):141–146. ↗
  20. Boudlal, A., Lakhouaja, A., Mazroui, A., Meziane, A., Bebah, M., and Shoul, M. (2010). Alkhalil Morpho Sys1: A morphosyntactic analysis system for Arabic texts. In Proceedings of the International Arab Conference on Information Technology, pages 1–6. find
  21. Buckwalter, T. (2002). Buckwalter Arabic morphological analyzer version 1.0. Linguistic Data Consortium (LDC) catalog number LDC2002L49, ISBN 1-58563-257-0. find
  22. Darwish, K. and Mubarak, H. (2016). Farasa: A new fast and accurate Arabic word segmenter. In Proceedings of the Language Resources and Evaluation Conference (LREC), Portorož, Slovenia. find
  23. Darwish, K. (2013). Named entity recognition using cross-lingual resources: Arabic as an example. In Proceedings of the 51st Annual Meeting of the Association for Computational Linguistics, pages 1558–1567. find
  24. Darwish, K. (2014). Arabizi Detection and Conversion to Arabic. In Proceedings of the Workshop for Arabic Natural Language Processing (WANLP), pages 217–224, Doha, Qatar. ↗
  25. Devlin, J., Chang, M.-W., Lee, K., and Toutanova, K. (2018). Bert: Pre-training of deep bidirectional transformers for language understanding. find
  26. Diab, M., Habash, N., Rambow, O., and Roth, R. (2013). LDC Arabic treebanks and associated corpora: Data divisions manual. arXiv preprint arXiv:1309.5652. ↗
  27. El Bazi, I. and Laachfoubi, N. (2019). Arabic named entity recognition using deep learning approach. International Journal of Electrical and Computer Engineering, 9:2025–2032. ↗
  28. Elfardy, H. and Diab, M. (2012). Simplified guidelines for the creation of large scale dialectal Arabic annotations. In Proceedings of the Language Resources and Evaluation Conference (LREC), Istanbul, Turkey. find
  29. Elfardy, H. and Diab, M. (2013). Sentence Level Dialect Identification in Arabic. In Proceedings of the Conference of the Association for Computational Linguistics (ACL), pages 456–461, Sofia, Bulgaria. find
  30. ElJundi, O., Antoun, W., El Droubi, N., Hajj, H., El-Hajj, W., and Shaban, K. (2019). hULMonA: The universal language model in Arabic. In Proceedings of the Fourth Arabic Natural Language Processing Workshop, pages 68–77, Florence, Italy, August. Association for Computational Linguistics. find
  31. Elmadany, A., Mubarak, H., and Magdy, W. (2018). Arsas: An Arabic speech-act and sentiment corpus of tweets. In Hend Al-Khalifa, et al., editors, Proceedings of the Eleventh International Conference on Language Resources and Evaluation (LREC 2018), Paris, France, may. European Language Resources Association (ELRA). find
  32. Eryani, F., Habash, N., Bouamor, H., and Khalifa, S. (2020). A Spelling Correction Corpus for Multiple Arabic Dialects. In Proceedings of the Language Resources and Evaluation Conference (LREC), Marseille, France. find
  33. Graff, D., Maamouri, M., Bouziri, B., Krouna, S., Kulick, S., and Buckwalter, T. (2009). Standard Arabic Morphological Analyzer (SAMA) Version 3.1. Linguistic Data Consortium LDC2009E73. find
  34. Habash, N. and Rambow, O. (2005). Arabic tokenization, part-of-speech tagging and morphological disambiguation in one fell swoop. In Proceedings of the Conference of the Association for Computational Linguistics (ACL), pages 573–580, Ann Arbor, Michigan. find our card
  35. Habash, N. and Rambow, O. (2006). MAGEAD: A morphological analyzer and generator for the Arabic dialects. In Proceedings of the International Conference on Computational Linguistics and the Conference of the Association for Computational Linguistics (COLING-ACL), pages 681–688, Sydney, Australia. ↗ our card
  36. Habash, N., Soudi, A., and Buckwalter, T. (2007). On Arabic Transliteration. In A. van den Bosch et al., editors, Arabic Computational Morphology: Knowledge-based and Empirical Methods, pages 15–22. Springer, Netherlands. ↗
  37. Habash, N., Rambow, O., and Roth, R. (2009). MADA+TOKAN: A toolkit for Arabic tokenization, diacritization, morphological disambiguation, POS tagging, stemming and lemmatization. In Khalid Choukri et al., editors, Proceedings of the International Conference on Arabic Language Resources and Tools, Cairo, Egypt. The MEDAR Consortium. find
  38. Habash, N., Eskander, R., and Hawwari, A. (2012). A Morphological Analyzer for Egyptian Arabic. In Proceedings of the Workshop of the Special Interest Group on Computational Morphology and Phonology (SIG-MORPHON), pages 1–9, Montréal, Canada. find our card
  39. Habash, N., Eryani, F., Khalifa, S., Rambow, O., Abdulrahim, D., Erdmann, A., Faraj, R., Zaghouani, W., Bouamor, H., Zalmout, N., Hassan, S., shargi, F. A., Alkhereyf, S., Abdulkareem, B., Eskander, R., Salameh, M., and Saddiki, H. (2018). Unified guidelines and resources for Arabic dialect orthography. In Proceedings of the Language Resources and Evaluation Conference (LREC), Miyazaki, Japan. find our card
  40. Habash, N. (2007). Arabic Morphological Representations for Machine Translation. In Antal van den Bosch et al., editors, Arabic Computational Morphology: Knowledge-based and Empirical Methods. Kluwer/Springer. ↗
  41. Habash, N. Y. (2010). Introduction to Arabic natural language processing. Morgan & Claypool Publishers. ↗
  42. Khalifa, S., Habash, N., Abdulrahim, D., and Hassan, S. (2016a). A Large Scale Corpus of Gulf Arabic. In Proceedings of the Language Resources and Evaluation Conference (LREC), Portorož, Slovenia. find
  43. Khalifa, S., Zalmout, N., and Habash, N. (2016b). Yamama: Yet another multi-dialect Arabic morphological analyzer. In Proceedings of the International Conference on Computational Linguistics (COLING), pages 223– 227, Osaka, Japan. find
  44. Khalifa, S., Zalmout, N., and Habash, N. (2020). Morphological Disambiguation for Gulf Arabic: The Interplay between Resources and Methods. In Proceedings of the Language Resources and Evaluation Conference (LREC), Marseille, France. find
  45. Loper, E. and Bird, S. (2002). NLTK: The Natural Language Toolkit. In Proceedings of the Workshop on Effective Tools and Methodologies for Teaching Natural Language Processing and Computational Linguistics, pages 63–70, Philadelphia, Pennsylvania. ↗
  46. Maamouri, M., Bies, A., Buckwalter, T., and Mekki, W. (2004). The Penn Arabic Treebank: Building a Large-Scale Annotated Arabic Corpus. In Proceedings of the International Conference on Arabic Language Resources and Tools, pages 102–109, Cairo, Egypt. find
  47. Maamouri, M., Bies, A., Kulick, S., Ciul, M., Habash, N., and Eskander, R. (2014). Developing an Egyptian Arabic Treebank: Impact of Dialectal Morphology on Annotation and Tool Development. In Proceedings of the Language Resources and Evaluation Conference (LREC), Reykjavik, Iceland. find
  48. Manning, C. D., Surdeanu, M., Bauer, J., Finkel, J., Bethard, S. J., and McClosky, D. (2014). The Stanford CoreNLP natural language processing toolkit. In Proceedings of the Conference of the Association for Computational Linguistics (ACL), pages 55–60. find our card
  49. Mohammed, N. and Omar, N. (2012). Arabic Named Entity Recognition using artificial neural network. Journal of Computer Science, 8:1285–1293. find
  50. Nabil, M., Aly, M., and Atiya, A. (2015). ASTD: Arabic sentiment tweets dataset. In Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing, pages 2515–2519, Lisbon, Portugal, September. Association for Computational Linguistics. ↗
  51. Obeid, O., Salameh, M., Bouamor, H., and Habash, N. (2019). ADIDA: Automatic dialect identification for Arabic. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics (Demonstrations), pages 6–11, Minneapolis, Minnesota, June. Association for Computational Linguistics. find
  52. Oudah, M. and Shaalan, K. (2012). A pipeline Arabic named entity recognition using a hybrid approach. In Proceedings of the 24th international conference on computational linguistics (COLING 2012), pages 2159– 2176. find
  53. Pasha, A., Al-Badrashiny, M., Diab, M., Kholy, A. E., Eskander, R., Habash, N., Pooleery, M., Rambow, O., and Roth, R. (2014). MADAMIRA: A fast, comprehensive tool for morphological analysis and disambiguation of Arabic. In Proceedings of the Language Resources and Evaluation Conference (LREC), pages 1094–1101, Reykjavik, Iceland. find our card
  54. Pasha, A., Al-Badrashiny, M., Diab, M., Habash, N., Pooleery, M., and Rambow, O., (2015). MADAMIRA v2.0 User Manual. find
  55. Qi, P., Dozat, T., Zhang, Y., and Manning, C. D. (2018). Universal dependency parsing from scratch. In Proceedings of the CoNLL 2018 Shared Task: Multilingual Parsing from Raw Text to Universal Dependencies, pages 160–170, Brussels, Belgium, October. Association for Computational Linguistics. find our card
  56. Rosenthal, S., Farra, N., and Nakov, P. (2017). Semeval-2017 task 4: Sentiment analysis in twitter. In Proceedings of the International Workshop on Semantic Evaluation (SemEval), pages 501–516, Vancouver, Canada. find our card
  57. Sadat, F., Kazemi, F., and Farzindar, A. (2014). Automatic Identification of Arabic Dialects in Social Media. In Proceedings of the Workshop on Natural Language Processing for Social Media (SocialNLP), pages 22–27, Dublin, Ireland. find
  58. Salameh, M., Bouamor, H., and Habash, N. (2018). Fine-grained Arabic dialect identification. In Proceedings of the International Conference on Computational Linguistics (COLING), pages 1332–1344, Santa Fe, New Mexico, USA. find
  59. Shaalan, K. and Raza, H. (2009). Nera: Named entity recognition for Arabic. Journal of the American Society for Information Science and Technology, 60:1652–1663. ↗
  60. Shahrour, A., Khalifa, S., Taji, D., and Habash, N. (2016). CamelParser: A system for Arabic syntactic analysis and morphological disambiguation. In Proceedings of the International Conference on Computational Linguistics (COLING), pages 228–232. find our card
  61. Smrž, O. (2007). ElixirFM — Implementation of Functional Arabic Morphology. In Proceedings of the Workshop on Computational Approaches to Semitic Languages (CASL), pages 1–8, Prague, Czech Republic. ACL. find our card
  62. Taji, D., Khalifa, S., Obeid, O., Eryani, F., and Habash, N. (2018). An Arabic Morphological Analyzer and Generator with Copious Features. In Proceedings of the Fifteenth Workshop on Computational Research in Phonetics, Phonology, and Morphology (SIGMORPHON), pages 140–150. find our card
  63. Vanni, M. and Zajac, R. (1996). The Temple translator’s workstation project. In Proceedings of the TIPSTER Text Program Workshop, pages 101–106, Vienna, Virginia. ↗
  64. Watson, D., Zalmout, N., and Habash, N. (2018). Utilizing character and word embeddings for text normalization with sequence-to-sequence models. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pages 837–843, Brussels, Belgium, October-November. Association for Computational Linguistics. ↗
  65. Wolf, T., Debut, L., Sanh, V., Chaumond, J., Delangue, C., Moi, A., Cistac, P., Rault, T., Louf, R., Funtowicz, M., and Brew, J. (2019). Huggingface’s transformers: State-of-the-art natural language processing. ArXiv, abs/1910.03771. ↗ our card
  66. Zaghouani, W., Mohit, B., Habash, N., Obeid, O., Tomeh, N., Rozovskaya, A., Farra, N., Alkuhlani, S., and Oflazer, K. (2014). Large Scale Arabic Error Annotation: Guidelines and Framework. In Proceedings of the Language Resources and Evaluation Conference (LREC), Reykjavik, Iceland. find our card
  67. Zaghouani, W. (2012). RENAR: A rule-based Arabic named entity recognition system. ACM Transactions on Asian Language Information Processing, 11:1–13. find
  68. Zaidan, O. F. and Callison-Burch, C. (2011). The Arabic Online Commentary Dataset: an Annotated Dataset of Informal Arabic With High Dialectal Content. In Proceedings of the Conference of the Association for Computational Linguistics (ACL), pages 37–41. find
  69. Zalmout, N. and Habash, N. (2017). Don’t throw those morphological analyzers away just yet: Neural morphological disambiguation for Arabic. In Proceedings of the Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 704–713, Copenhagen, Denmark. find our card
  70. Zalmout, N. and Habash, N. (2019). Adversarial multitask learning for joint multi-feature and multi-dialect morphological modeling. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 1775–1786, Florence, Italy, July. Association for Computational Linguistics. find our card
  71. Zalmout, N., Erdmann, A., and Habash, N. (2018). Noise-robust morphological disambiguation for dialectal Arabic. In Proceedings of the Conference of the North American Chapter of the Association for Computational Linguistics (NAACL), New Orleans, Louisiana, USA. find our card
  72. Zampieri, M., Malmasi, S., Ljubešić, N., Nakov, P., Ali, A., Tiedemann, J., Scherrer, Y., and Aepli, N. (2017). Findings of the VarDial Evaluation Campaign 2017. In Proceedings of the Workshop on NLP for Similar Languages, Varieties and Dialects (VarDial), pages 1–15, Valencia, Spain. find our card

↑ back to top

This page in Markdown → https://md.research.elamur.ai/free/en/papers/obeid-2020-camel-tools-open-source-python/