Negation Handling in Machine Learning-Based Sentiment Classification for Colloquial Arabic
Summary
The paper addresses negation in machine learning sentiment classification for colloquial (dialectal) Arabic. In this setting, a negator such as "not" can reverse a review's polarity, but bag-of-words features cannot see that reversal. Dialectal Arabic also lacks reliable POS taggers, morphological analysers and stemmers, so syntax-based scope detection is not an option. The author proposes a rule-based algorithm. The rules come from manually observing many negation cases in colloquial reviews and combine simple linguistic knowledge with a sentiment lexicon. The algorithm first finds negation words, ruling out cases where a particle such as "ما" serves another function, for example as a relative pronoun. It then flips only the opinionated words inside a five-word window after the negator, not every word in that window. The method was tested with SVM, Naïve Bayes, K-NN and Logistic Regression against three baselines. It gave the best overall results without inflating the feature space. This shows that targeted, lexicon-guided negation marking can work in languages that have few resources.
Key points
- Four classifiers were compared: SVM, NB, K-NN and Logistic Regression. Each was tested with three baselines (Baseline 1 has no negation handling, Baseline 2 tags every word in a 5-word window, and Baseline 3 uses another scope strategy) and with the proposed algorithm.
- The best accuracy came from SVM with the proposed algorithm: 89.17%, against 87.83% without negation handling and 89.08% with Baseline 2.
- K-NN was hurt by blanket window tagging, dropping from 86.50% to 85.88% accuracy. With the proposed rules it reached 87.75%. NB was the one classifier where Baseline 2 stayed slightly ahead (80.62% vs 80.04%).
- Feature-space size differed by approach:
- Baseline 1 produced 12,074 features.
- Baseline 2 produced 14,304 features.
- Baseline 3 produced 18,692 features.
- The proposed algorithm avoided this sparse growth.
- Negators appear more often in negative reviews, so the baselines show recall below precision. Better negation handling mainly reduces false negatives.
Interesting ideas
- I1. Negation is applied only to lexicon-listed opinion words inside the scope, not to every token there, so neutral words keep a single identity and the feature space stays compact.
- I2. Before treating a particle as a negator, the rules check whether it is actually doing another job, such as acting as a relative pronoun, which keeps false negation triggers out.
- I3. Feature count is reported next to accuracy as a hidden cost, which exposes that naive scope tagging buys small gains by adding thousands of sparse features.
- I4. The recall-versus-precision gap is explained by negators being unevenly spread across classes, which ties an error pattern to a linguistic distribution.
- I5. The examples show why fixed n-grams fail when the negator and the affected word are far apart (a 6-gram would be needed), which argues for structure-aware scope.
For Mova
How these ideas could serve Mova, our small open language model — its files, stages and tests:
- I1 (frames): When prag assigns polarity under a negator, it could flip only the evaluative predicates and arguments in the negated subtree, leaving neutral participants unmarked.
- I2 (tokens): The tagger could carry an explicit "is-negator" decision for ambiguous items (e.g. "no" as determiner vs. interjection, "nothing but") so that later stages do not have to rediscover it.
- I3 (learn): Evaluations of new rule sets or features could report how much the representation grows, so cheap, compact repairs are favoured over bloat with similar scores.
- I4 (learn): Evaluation could slice errors by presence of negation in the input as a control slice, showing whether the negation logic, rather than general accuracy, is what improved.
- I5 (tree): Mova can resolve scope via UD
advmod/detattachments of negators to their heads, so long-distance negation is handled by the tree.
Topics Sentiment & emotion Semitic languages
Institutions
Cite
Cite as Omar Al-Harbi. 2020. Negation Handling in Machine Learning-Based Sentiment Classification for Colloquial Arabic. arXiv:2107.11597 · International Journal of Operations Research and Information Systems (2020) 33-45.
@misc{alharbi2020negation,
title = {{Negation Handling in Machine Learning-Based Sentiment Classification for Colloquial Arabic}},
author = {Omar Al-Harbi},
year = {2020},
doi = {10.4018/ijoris.2020100102},
eprint = {2107.11597},
archivePrefix = {arXiv},
url = {https://doi.org/10.4018/ijoris.2020100102}
}References
- Abdulla, N. A., Ahmed, N. A., Shehab, M. A., & Al-Ayyoub, M. (2013). Arabic sentiment analysis: Lexicon-based and corpus-based. Paper presented at the conference on applied electrical engineering and computing technologies (AEECT), Amman. find
- Adouane, W., & Johansson, R. (2016). Gulf arabic linguistic resource building for sentiment analysis. Paper presented at the the Tenth International Conference on Language Resources and Evaluation, Portorož. our card
- Al-Harbi, O. (2017). Using objective words in the reviews to improve the colloquial arabic sentiment analysis. International Journal on Natural Language Computing, 6(3), 1-14. our card
- Al-Harbi, O. (2019). A comparative study of feature selection methods for dialectal arabic sentiment classification using support vector machine. International Journal of Computer Science and Network Security, 19(1), 167-176. our card
- Al-Obaidi, A. Y., & Samawi, V. W. (2016). Opinion mining: Analysis of comments written in arabic colloquial. Paper presented at the the World Congress on Engineering and Computer Science, San Francisco. find
- Amalia, R., Bijaksana, M. A., & Darmantoro, D. (2018). Negation handling in sentiment classification using rule-based adapted from indonesian language syntactic for indonesian text in twitter. Paper presented at the Journal of Physics: Conference Series. find
- Ballesteros, M., Díaz, A., Francisco, V., Gervás, P., De Albornoz, J. C., & Plaza, L. (2012). Ucm-2: A rule-based approach to infer the scope of negation via dependency parsing. Paper presented at the the First Joint Conference on Lexical and Computational Semantics-Volume 1: Proceedings of the main conference and the shared task, and Volume 2: Proceedings of the Sixth International Workshop on Semantic Evaluation. find
- Chang, C.-C., & Lin, C.-J. (2001). Libsvm: A library for support vector machines. ACM transactions on intelligent systems and technology, 2(3), 1-27. find
- Das, S., & Chen, M. (2001). Yahoo! For amazon: Extracting market sentiment from stock message boards. Paper presented at the the Asia Pacific finance association annual conference, Bangkok. find
- Duwairi, R. M., & Alshboul, M. A. (2015). Negation-aware framework for sentiment analysis in arabic reviews. Paper presented at the 3rd International Conference on Future Internet of Things and Cloud, Rome. find
- Duwairi, R. M., Marji, R., Sha'ban, N., & Rushaidat, S. (2014). Sentiment analysis in arabic tweets. Paper presented at the 5th International Conference on Information and Communication Systems, Malacca. find
- International Journal of Operations Research and Information Systems Volume 11 • Issue 4 • October-December 2020 find
- El-Beltagy, S. R., & Ali, A. (2013). Open issues in the sentiment analysis of arabic social media: A case study. Paper presented at the 9th International Conference on Innovations in Information Technology, Abu Dhabi. find
- El-Halees, A. M. (2011). Arabic opinion mining using combined classification approach. Paper presented at the the International Arab Conference on Information Technology, Zarqa. find
- Elhawary, M., & Elfeky, M. (2010). Mining arabic business reviews. Paper presented at the the international conference on data mining workshops, Sydney. find
- Farra, N., Challita, E., Assi, R. A., & Hajj, H. (2010). Sentence-level and document-level sentiment mining for arabic texts. Paper presented at the the international conference on data mining workshops, Sydney. find
- Gautam, D., Maharjan, N., Banjade, R., Tamang, L. J., & Rus, V. (2018). Long short term memory based models for negation handling in tutorial dialogues. Paper presented at the the Thirty-First International Flairs Conference, Melbourne Hamouda, A. E.-D. find
- A., & El-taher, F. (2013). Sentiment analyzer for arabic comments system. International Journal of Advanced Computer Science and Applications, 4(3), 99-103. find
- Jia, L., Yu, C., & Meng, W. (2009). The effect of negation on sentiment analysis and retrieval effectiveness. Paper presented at the the 18th ACM conference on Information and knowledge management, Hong Kong. find
- Mittal, N., Agarwal, B., Chouhan, G., Bania, N., & Pareek, P. (2013). Sentiment analysis of hindi reviews based on negation and discourse relation. Paper presented at the the 11th Workshop on Asian Language Resources, Nagoya. find
- Morante, R., & Daelemans, W. (2009). A metalearning approach to processing the scope of negation. Paper presented at the the Thirteenth Conference on Computational Natural Language Learning, Colorado Morsy, S. A. (2011). Recognizing contextual valence shifters in document-level sentiment classification. (Master), American University in Cairo, Cairo. find
- Mostafa, A. M. (2017). An automatic lexicon with exceptional-negation algorithm for arabic sentiments using supervised classification. Journal of Theoretical & Applied Information Technology, 95(15), 3662-3671. find
- Pang, B., & Lee, L. (2004). A sentimental education: Sentiment analysis using subjectivity summarization based on minimum cuts. Paper presented at the the 42nd annual meeting on Association for Computational Linguistics, Barcelona. our card
- Pang, B., Lee, L., & Vaithyanathan, S. (2002). Thumbs up?: Sentiment classification using machine learning techniques. Paper presented at the the ACL-02 conference on Empirical methods in natural language processing. our card
- Polanyi, L., & Zaenen, A. (2006). Contextual valence shifters Computing attitude and affect in text: Theory and applications (pp. 1-10): Springer. find
- Taboada, M., Brooke, J., Tofiloski, M., Voll, K., & Stede, M. (2011). Lexicon-based methods for sentiment analysis. Computational linguistics, 37(2), 267-307. our card
- International Journal of Operations Research and Information Systems Volume 11 • Issue 4 • October-December 2020 Villalba-Osornio, S. G., Pérez-Celis, J. A., Villasenor-Pineda, L., & Montes-y-Gómez, M. Sentiment analysis for reviews in spanish: Algorithm for negation handling. journal on Computer science and computer engineering(97), 21-34. find
- Wiegand, M., Balahur, A., Roth, B., Klakow, D., & Montoyo, A. (2010). A survey on the role of negation in sentiment analysis. Paper presented at the the workshop on negation and speculation in natural language processing, Uppsala. find
- Zhang, L., Ferrari, S., & Enjalbert, P. (2012). Opinion analysis: The effect of negation on polarity and intensity. Paper presented at the KONVENS, Vienna. find
- Zou, B., Zhu, Q., & Zhou, G. (2015). Negation and speculation identification in chinese language. Paper presented at the the 53rd Annual Meeting of the Association for Computational Linguistics and the 7th International Joint Conference on Natural Language Processing (Volume 1: Long Papers), Beijing. find
This page in Markdown → https://md.research.elamur.ai/free/en/papers/al-harbi-2021-negation-handling-machine-learning-based/