Arabic Data Science Toolkit: An API for Arabic Language Feature Extraction
Paper · 2018 · Paul Rodrigues, Valerie Novak, C. Anton Rytting et al.
Summary
The paper presents the Arabic Data Science Toolkit (ADST). It is meant for data scientists who need linguistically informed features from Arabic text but know neither Arabic nor NLP. The authors argue that purely statistical representations such as bag of words work poorly for a morphologically rich language like Arabic. ADST therefore focuses on features that need language-specific or psychological knowledge. It is written mainly in Python, served as an HTTP web service through Flask, and exchanges JSON-like data, so any programming language can use it. Individual Python and Perl scripts can also run on their own.
The toolkit targets social-media text in both MSA and Egyptian Arabic. Its first use cases are emotion classification and authorship attribution. It wraps existing resources: MADAMIRA, the NRC Word-Emotion Association Lexicon, and the Attia et al. Arabic word list. On top of these it adds hand-built detectors for laughter, ululation, elongation and misspellings. No classification experiments are reported. The contribution is a single access point to the best Arabic tools, including ones that open-source toolkits like NLTK leave out for licensing reasons.
Key points
- ADST is an HTTP API built on Flask with JSON-like input and output. A user can request all features, a feature set, or a single feature.
- MADAMIRA runs in its Egyptian configuration and segments text under two schemes, ATB and ATB4MT. Its output yields frequency histograms of gender, number, person, aspect, clitics, POS and lemmas, plus a list of OOV words.
- The NRC lexicon covers 8 emotions plus positive and negative sentiment. It was crowdsourced in English and machine-translated into 39 languages, without context, using Google Translate.
- Laughter detectors find single letters repeated three or more times (خ, ح, ه) and multi-letter patterns that also involve ق, ع, ا and ي. They include a dedicated detector for Spanish-style "jaja" written in Arabic script.
- The spelling module checks only OOV words against Arabic Wordlist 1.6 (9,196,215 inflected forms). It ranks candidate intended words with an OpenFST noisy-channel model trained on quickly typed Arabic and separates "minor" from "major" errors.
Interesting ideas
- I1. Laughter variants are kept as distinct categories rather than merged into one class, as TweeboParser does: presence and length signal emotion intensity, while the specific form signals the author.
- I2. Spelling correction runs only on out-of-vocabulary words and returns an n-best list of intended words from a weighted noisy-channel FST, with cost thresholds that sort errors into minor and major.
- I3. Repeated letters (elongation) and laughter length are treated as a measurable degree of emotion, not just a yes/no flag.
- I4. A foreign laugh written in native script ("jaja" in Arabic letters) was identified from contextual evidence: Spanish-language surroundings and nearby laughter emoji.
- I5. The workflow is to extract every available feature first, then use feature selection to keep a smaller fast subset for production.
For Mova
How these ideas could serve Mova, our small open language model — its files, stages and tests:
- I1 (tokens): the tokenizer could tag interjections with a subtype and a repetition-length attribute rather than a generic INTJ, so later stages still see that signal.
- I2 (tokens): noisy input could be normalized this way before tagging, keeping the original form and the chosen correction with its cost as an explainable trace.
- I3 (frames): an intensity value attached to the speaker could feed speech-act and irony judgments, for example telling enthusiastic agreement apart from flat agreement.
- I4 (world): ambiguous tokens could be resolved by recording surrounding-language and emoji cues as explicit evidence, rather than guessing from the string alone.
- I5 (learn): candidate cues for repair rules or classifiers could be generated broadly, then pruned by measured usefulness against negative controls, keeping only the ones that justify their cost.
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 Paul Rodrigues, Valerie Novak, C. Anton Rytting, Julie Yelle and Jennifer Boutz. 2018. Arabic Data Science Toolkit: An API for Arabic Language Feature Extraction. Proceedings of the Eleventh International Conference on Language Resources and Evaluation (LREC 2018).
@inproceedings{rodrigues2018arabic,
title = {{Arabic Data Science Toolkit: An API for Arabic Language Feature Extraction}},
author = {Paul Rodrigues, Valerie Novak, C. Anton Rytting, Julie Yelle and Jennifer Boutz},
booktitle = {Proceedings of the Eleventh International Conference on Language Resources and Evaluation (LREC 2018)},
year = {2018},
doi = {10.63317/2qcsskyrb6m5},
url = {https://doi.org/10.63317/2qcsskyrb6m5}
}References
- Attia, M., Pecina, P., Samih, Y., Shaalan, K., and van Genabith, J. (2012). Improved spelling error detection and correction for Arabic. In Martin Kay et al., editors, Proceedings of COLING 2012, Bumbai, India.
- Attia, M., Pecina, P., Toral, A., and van Genabith, J. (2014). A corpus-based finite-state morphological toolkit for contemporary Arabic. Journal of Logic and Computation, 24(2):455–472. ↗
- Baalbaki, R. (1995). al-Mawrid: A modern Arabic-English dictionary. Dar El-Ilm Lilmalayin, Beirut. find
- Badawi, E.-S. and Hinds, M. (1986). A dictionary of Egyptian Arabic. Librairie du Liban, Beirut. find
- Cowan, M. J. (1994). Arabic-English Dictionary: The Hans Wehr Dictionary of Modern Written Arabic. Spoken Language Services, Urbana, IL. find
- Ekman, P. (1992). An argument for basic emotions. Cognition and Emotion, 6(3):169–200. ↗
- Frank, A. J. and Mamatov, J. (2002). Dictionary of Central Asian Islamic terms. Dunwoody Press, Springfield, VA. find
- Kulick, S., Gabbard, R., and Marcus, M. (2006). Parsing the Arabic treebank: Analysis and improvements. In Proceedings of the Treebanks and Linguistic Theories Conference. find
- Marton, Y., Habash, N., and Rambow, O. (2013). Dependency parsing of modern standard Arabic with lexical and inflectional features. Computational Linguistics, 39(1):161–194. ↗
- Moffit, K. and Giboney, J. S. (2015). SPLICE beta v0.9.0. http://splice.cmi.arizona.edu/. ↗
- Mohammad, S. M. and Turney, P. D. (2013). Crowdsourcing a word-emotion association lexicon. Computational Intelligence, 29(3):436–465. ↗
- Owoputi, O., O’Connor, B., Dyer, C., Gimpel, K., Schneider, N., and Smith, N. A. (2013). Improved part-of-speech tagging for online conversational text with word clusters. In Proceedings of NAACL.
- Pasha, A., Al-Badrashiny, M., Diab, M., Kholy, A. E., Eskander, R., Habash, N., Pooleery, M., Rambow, O., and Roth, R. M. (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.
- The Writing Center at The University of Wisconsin-Madison. (2016). Uw-madison writer’s handbook. http://writing.wisc.edu/handbook/. ↗
Updated
This page in Markdown → https://md.research.elamur.ai/free/en/papers/rodrigues-2018-arabic-data-science-toolkit-api/