Improving Sentiment Analysis of Moroccan Tweets Using Ensemble Learning

Conference paper
Part of the Communications in Computer and Information Science book series (CCIS, volume 872)


With the proliferation of the internet and the social media, increasing huge contents are generated each day across the world. Such huge data mines attract the attention of many entities. Indeed, by analyzing sentiments expressed in such content, government, businesses and particulars can extract valuable knowledge in order to enhance their strategies. Many approaches have been proposed to classify the posted content. Most of them are based on a single classifier. However, it has been proved that combining multiple classifiers and ensemble learning may give better performance. It is noticed from the literature, that sentiment classification in Arabic language based on the ensemble learning has not been well explored. Therefore, we aim through this study to improve the Arabic sentiment classification by combining different classification algorithms. So, we investigated the benefit of multiple classifier systems on Moroccan sentiment classification. First, three classification algorithms, called Naive Bayes, Maximum Entropy and support vector machines, are adopted as base-classifiers. Second, stacking generalization is introduced based on those algorithms with different settings and compared with the majority voting. The experimental results show that combining classifiers can effectively improve the accuracy of Moroccan datasets sentiment classification. Results show that this combination based on the majority voting is consistently effective, works better and needs less time to build the model than any other combination approach.


Sentiment analysis Ensemble learning Machine learning Arabic 


  1. 1.
    Medhat, W., Hassan, A., Korashy, H.: Sentiment analysis algorithms and applications: a survey. Ain Shams Eng. J. 5(4), 1093–1113 (2014)CrossRefGoogle Scholar
  2. 2.
    Boudad, N., Faizi, R., Thami, R.O.H., Chiheb, R.: Sentiment analysis in arabic: a review of the literature. Ain Shams Eng. J. (2017, in press).
  3. 3.
    Al Shboul, B., Al-Ayyoub, M., Jararweh, Y.: Multi-way sentiment classification of arabic reviews. In: 6th International Conference on Information and Communication Systems (ICICS), pp. 206–211. IEEE (2015)Google Scholar
  4. 4.
    Godsay, M.: The process of sentiment analysis: a study. Int. J. Comput. Appl. 126(7), 26–30 (2015)Google Scholar
  5. 5.
    Mostafa, A.M.: An evaluation of sentiment analysis and classification algorithms for Arabic textual data. Int. J. Comput. Appl. 158(3) (2017)Google Scholar
  6. 6.
    Biltawi, M., Etaiwi, W., Tedmori, S., Hudaib, A., Awajan, A.: Sentiment classification techniques for Arabic language: a survey. In: 7th International Conference on Information and Communication Systems (ICICS), pp. 339–346. IEEE (2016)Google Scholar
  7. 7.
    Shaheen, M., Ezzeldin, A.M.: Arabic question answering: systems, resources, tools, and future trends. Arab. J. Sci. Eng. 39, 4541 (2014). Scholar
  8. 8.
    Assiri, A., Emam, A., Aldossari, H.: Arabic sentiment analysis: a survey. Int. J. Adv. Comput. Sci. Appl. 6(12), 75–85 (2015)Google Scholar
  9. 9.
    Medhaffar, S., Bougares, F., Esteve, Y., Hadrich-Belguith, L.: Sentiment analysis of Tunisian dialects: linguistic ressources and experiments. In: Proceedings of the Third Arabic Natural Language Processing Workshop, pp. 55–61 (2017)Google Scholar
  10. 10.
    Rushdi-Saleh, M., Martín-Valdivia, M.T., Ureña-López, L.A., Perea-Ortega, J.M.: OCA: opinion corpus for Arabic. J. Assoc. Inf. Sci. Technol. 62(10), 2045–2054 (2011)CrossRefGoogle Scholar
  11. 11.
    Abdulla, N.A., Ahmed, N.A., Shehab, M.A., Al-Ayyoub, M.: Arabic sentiment analysis: lexicon-based and corpus-based. In: IEEE Jordan Conference on Applied Electrical Engineering and Computing Technologies (AEECT), pp. 1–6 (2013)Google Scholar
  12. 12.
    Nabil, M., Aly, M.A., Atiya, A.F.: ASTD: Arabic sentiment tweets dataset. In: EMNLP, pp. 2515–2519 (2015)Google Scholar
  13. 13.
    Aly, M.A., Atiya, A.F.: LABR: a large scale Arabic book reviews dataset. In: ACL, vol. 2, pp. 494–498 (2013)Google Scholar
  14. 14.
    ElSahar, H., El-Beltagy, S.R.: Building large Arabic multi-domain resources for sentiment analysis. In: Gelbukh, A. (ed.) CICLing 2015. LNCS, vol. 9042, pp. 23–34. Springer, Cham (2015). Scholar
  15. 15.
    Salameh, M., Mohammad, S., Kiritchenko, S.: Sentiment after translation: a case-study on Arabic social media posts. In: HLT-NAACL, pp. 767–777 (2015)Google Scholar
  16. 16.
    Al-Moslmi, T., Albared, M., Al-Shabi, A., Omar, N., Abdullah, S.: Arabic senti-lexicon: constructing publicly available language resources for Arabic sentiment analysis. J. Inf. Sci. 44(3), 345–362 (2017)CrossRefGoogle Scholar
  17. 17.
    Wang, G., Sun, J., Ma, J., Xu, K., Gu, J.: Sentiment classification: the contribution of ensemble learning. Decis. Support Syst. 57, 77–93 (2014)CrossRefGoogle Scholar
  18. 18.
    Da Silva, N.F., Hruschka, E.R., Hruschka, E.R.: Tweet sentiment analysis with classifier ensembles. Decis. Support Syst. 66, 170–179 (2014)CrossRefGoogle Scholar
  19. 19.
    Catal, C., Nangir, M.: A sentiment classification model based on multiple classifiers. Appl. Soft Comput. 50, 135–141 (2017)CrossRefGoogle Scholar
  20. 20.
    Su, Y., Zhang, Y., Ji, D., Wang, Y., Wu, H.: Ensemble learning for sentiment classification. In: Ji, D., Xiao, G. (eds.) CLSW 2012. LNCS (LNAI), vol. 7717, pp. 84–93. Springer, Heidelberg (2013). Scholar
  21. 21.
    Fersini, E., Messina, E., Pozzi, F.A.: Sentiment analysis: Bayesian ensemble learning. Decis. Support Syst. 68, 26–38 (2014)CrossRefGoogle Scholar
  22. 22.
    Omar, N., Albared, M., Al-Shabi, A.Q., Al-Moslmi, T.: Ensemble of classification algorithms for subjectivity and sentiment analysis of Arabic customers’ reviews. Int. J. Adv. Comput. Technol. 5(14), 77 (2013)Google Scholar
  23. 23.
    El-Halees, A.: Arabic opinion mining using combined classification approach (2011)Google Scholar
  24. 24.
    Bayoudhi, A., Ghorbel, H., Belguith, L.H.: Sentiment classification of Arabic documents: experiments with multi-type features and ensemble algorithms. In: PACLIC (2015)Google Scholar
  25. 25.
    Al-Azani, S., El-Alfy, E.S.M.: Using word embedding and ensemble learning for highly imbalanced data sentiment analysis in short arabic text. Procedia Comput. Sci. 109, 359–366 (2017)CrossRefGoogle Scholar
  26. 26.
  27. 27.
    Rosenthal, S., Farra, N., Nakov, P.: SemEval-2017 task 4: sentiment analysis in Twitter. In: Proceedings of the 11th International Workshop on Semantic Evaluation (2017)Google Scholar
  28. 28.
    Mustafa, M., Eldeen, A.S., Bani-Ahmad, S., Elfaki, A.O.: A comparative survey on Arabic stemming: approaches and challenges. Intell. Inf. Manag. 9(02), 39 (2017)Google Scholar
  29. 29.
    Haraty, R.A., Khatib, S.A.: T-Stem-A superior stemmer and temporal extractor for Arabic texts. J. Digit. Inf. Manag. 3(3), 173 (2005)Google Scholar
  30. 30.
    Liu, B., Zhang, L.: A survey of opinion mining and sentiment analysis. In: Aggarwal, C., Zhai, C. (eds.) Mining Text Data, pp. 415–463. Springer, Boston (2012). Scholar
  31. 31.
    Pang, B., Lee, L., Vaithyanathan, S.: Thumbs up?: sentiment classification using machine learning techniques. In: Proceedings of the ACL-02 Conference on Empirical Methods in Natural Language Processing, vol. 10, pp. 79–86. Association for Computational Linguistics (2002)Google Scholar
  32. 32.
    Saloot, M.A., Idris, N., Mahmud, R., Ja’afar, S., Thorleuchter, D., Gani, A.: Hadith data mining and classification: a comparative analysis. Artif. Intell. Rev. 46(1), 113–128 (2016)CrossRefGoogle Scholar
  33. 33.
    Duwairi, R.M., Alfaqeh, M., Wardat, M., Alrabadi, A.: Sentiment analysis for Arabizi text. In: 7th International Conference Information and Communication Systems (ICICS), pp. 127–132. IEEE (2016)Google Scholar
  34. 34.
    Tripathy, A., Agrawal, A., Rath, S.K.: Classification of sentiment reviews using n-gram machine learning approach. Expert Syst. Appl. 57, 117–126 (2016)CrossRefGoogle Scholar
  35. 35.
    Abbas, M., Smaïli, K., Berkani, D.: Evaluation of topic identification methods on Arabic corpora. JDIM 9(5), 185–192 (2011)Google Scholar
  36. 36.
    Ye, Q., Zhang, Z., Law, R.: Sentiment classification of online reviews to travel destinations by supervised machine learning approaches. Expert Syst. Appl. 36(3), 6527–6535 (2009)CrossRefGoogle Scholar
  37. 37.
    Wan, X.: Co-training for cross-lingual sentiment classification. In: Proceedings of the Joint Conference of the 47th Annual Meeting of the ACL and the 4th International Joint Conference on Natural Language Processing of the AFNLP, vol. 1, pp. 235–243. Association for Computational Linguistics (2009)Google Scholar
  38. 38.
    El-Halees, A.M.: Arabic text classification using maximum entropy. IUG J. Nat. Stud. 15(1) (2015)Google Scholar
  39. 39.
    Oussous, A., Benjelloun, F.Z., Lahcen, A.A., Belfkih, S.: Big data technologies: a survey. J. King Saud Univ.-Comput. Inf. Sci. (2017, in press).

Copyright information

© Springer Nature Switzerland AG 2018

Authors and Affiliations

  1. 1.LGS, National School of Applied Sciences (ENSA)Ibn Tofail UniversityKenitraMorocco
  2. 2.LRIT, Unité associée au CNRST URAC 29Mohammed V University in RabatRabatMorocco

Personalised recommendations