Skip to main content
Log in

Text emotion detection in social networks using a novel ensemble classifier based on Parzen Tree Estimator (TPE)

  • Original Article
  • Published:
Neural Computing and Applications Aims and scope Submit manuscript

Abstract

The texts often express the emotions of the writers or cause emotions in the readers. In recent years, the development of the social networks has made emotional analysis of texts into an attractive topic for research. A sentiment analysis system for automatic detection of fine-grained emotions in text consists of three main parts of preprocessing, feature extraction and classification. The main focus of this paper is on presenting a novel ensemble classifier that is consisted of 1500 of k-Nearest Neighbor, Multilayer Perceptron and Decision Tree basic classifiers, which is able to systematically distinguish different fine-grained emotions between regular and irregular sentences with a proper accuracy. Moreover, Tree-structured Parzen Estimator is employed to tune parameters of the basic classifiers. The preprocessing and feature extraction operations are performed by natural language processing tools (Tokenization and Lemmatization) and Doc2Vector algorithm, respectively. Three different sets of ISEAR, OANC and CrowdFlower are used to evaluate the proposed method, which consists of regular and irregular sentences. The evaluation results show that accuracies of the proposed ensemble classifier are 99.49 and 88.49% in the detection of regular and irregular sentences, respectively.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8

Similar content being viewed by others

References

  1. Ekman P (1972) Universal and cultural differences in facial expression of emotion. In: Nebraska symposium on motivation, vol 19, pp 207–284

  2. Colombetti G (2009) From affect programs to dynamical discrete emotions. Philos Psychol 22(4):407–425

    Article  Google Scholar 

  3. Roseman IJ (1991) Appraisal determinants of discrete emotions. Cogn Emot 5(3):161–200

    Article  Google Scholar 

  4. Ekman P (1992) An argument for basic emotions. Cogn Emot 6(3–4):169–200

    Article  Google Scholar 

  5. Chaffar S, Inkpen D (2011) Using a heterogeneous dataset for emotion analysis in text. In: Canadian conference on artificial intelligence, pp 62–67

    Chapter  Google Scholar 

  6. Perikos I, Hatzilygeroudis I (2016) Recognizing emotions in text using ensemble of classifiers. Eng Appl Artif Intell 51:191–201

    Article  Google Scholar 

  7. Medhat W, Hassan A, Korashy H (2014) Sentiment analysis algorithms and applications: a survey. Ain Shams Eng J 5(4):1093–1113

    Article  Google Scholar 

  8. De Marneffe M-C, MacCartney B, Manning CD (2006) Generating typed dependency parses from phrase structure parses. In: Proceedings of LREC, pp 449–454

  9. Strapparava C, Valitutti A (2004) Wordnet affect: an affective extension of wordnet. In: Lrec, pp 1083–1086

  10. Xuegong Z (2000) Introduction to statistical learning theory and support vector machines. Acta Autom Sin 26(1):32–42

    MathSciNet  Google Scholar 

  11. Wu X et al (2008) Top 10 algorithms in data mining. Knowl Inf Syst 14(1):1–37

    Article  Google Scholar 

  12. Murray AF (1995) Applications of neural networks. The University of Edinburgh UK: Springer, Boston, MA

    Chapter  Google Scholar 

  13. Rokach L, Maimon O (2005) Top-down induction of decision trees classifiers—a survey. IEEE Trans Syst Man Cybern Part C (Appl Rev) 35(4):476–487

    Article  Google Scholar 

  14. Zhang Y, Jin R, Zhou Z-H (2012) Understanding bag-of-words model: a statistical framework. Int J Mach Learn Cybern 1(1–4):43–52

    Google Scholar 

  15. Mikolov T et al (2013) Efficient estimation of word representations in vector space. arXiv preprint arXiv:1301.3781

  16. Le Q, Mikolov T (2014) Distributed representations of sentences and documents. In: International conference on machine learning, pp 1188–1196

  17. Bergstra JS et al (2011) Algorithms for hyper-parameter optimization. In: Advances in neural information processing systems, pp 2546–2554

  18. Hutter F, Hoos HH, Leyton-Brown K (2011) Sequential model-based optimization for general algorithm configuration. In: International conference on learning and intelligent optimization, pp 507–523

    Google Scholar 

  19. Zhao M, Li J (2018) Tuning the hyper-parameters of CMA-ES with tree-structured Parzen estimators. In: Tenth international conference on advanced computational intelligence (ICACI), pp 613–618

  20. Hinz T et al (2018) Speeding up the hyperparameter optimization of deep convolutional neural networks. Int J Comput Intell Appl 17(2):1850008

    Article  Google Scholar 

  21. Ilievski I et al (2017) Efficient hyperparameter optimization for deep learning algorithms using deterministic RBF surrogates. In: AAAI, pp 822–829

  22. Madrigal F, Maurice C, Lerasle F (2019) Hyper-parameter optimization tools comparison for Multiple Object Tracking applications. Mach Vis Appl 30(2):269–289

    Article  Google Scholar 

  23. Wang S et al (2018) A TPE based inversion of PROSAIL for estimating canopy biophysical and biochemical variables of oilseed rape. Comput Electron Agric 152:350–362

    Article  Google Scholar 

  24. Jones DR (2001) A taxonomy of global optimization methods based on response surfaces. J Glob Optim 21(4):345–383

    Article  MathSciNet  Google Scholar 

  25. Quan C, Ren F (2010) Sentence emotion analysis and recognition based on emotion words using Ren-CECps. Int J Adv Intell 2(1):105–117

    Google Scholar 

  26. Balahur A, Hermida JM, Montoyo A (2011) Detecting implicit expressions of sentiment in text based on commonsense knowledge. In: Proceedings of the 2nd workshop on computational approaches to subjectivity and sentiment analysis, pp 53–60

  27. Balahur A, Hermida JM, Montoyo A (2012) Building and exploiting emotinet, a knowledge base for emotion detection based on the appraisal theory model. IEEE Trans Affect Comput 3(1):88–101

    Article  Google Scholar 

  28. Badugu S, Suhasini M (2017) Emotion detection on twitter data using knowledge base approach. Int J Comput Appl 162(10):975–978

    Google Scholar 

  29. Danisman T, Alpkocak A (2008) Feeler: emotion classification of text using vector space model. In: AISB 2008 convention communication, interaction and social intelligence, p 53

  30. Quan C, Ren F (2016) Weighted high-order hidden Markov models for compound emotions recognition in text. Inf Sci 329:581–596

    Article  Google Scholar 

  31. Webster JJ, Kit C (1992) Tokenization as the initial phase in NLP. In: Proceedings of the 14th conference on computational linguistics, vol 4, pp 1106–1110

  32. Jivani AG (2011) A comparative study of stemming algorithms. Int J Comput Technol Appl 2(6):1930–1938

    Google Scholar 

  33. Efron B, Tibshirani RJ (1994) An introduction to the bootstrap. CRC Press, Boca Raton

    MATH  Google Scholar 

  34. ISEAR, [online]. http://emotion-research.net/toolbox/toolboxdatabase.2006-10-13.2581092615. Accessed Sept 2017

  35. Open American National Corpus, [online]. http://www.anc.org/data/masc. Accessed: Sept 2017

  36. The Emotion in Text data set by CrowdFlower, [online]. https://www.crowdflower.com/wpcontent/uploads/2016/07/text_emotion.csv. Accessed Sept 2017

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Mohammad Mosleh.

Ethics declarations

Conflict of interest

The authors declare that there is no conflict of interest regarding the publication of this paper.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Ghanbari-Adivi, F., Mosleh, M. Text emotion detection in social networks using a novel ensemble classifier based on Parzen Tree Estimator (TPE). Neural Comput & Applic 31, 8971–8983 (2019). https://doi.org/10.1007/s00521-019-04230-9

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00521-019-04230-9

Keywords

Navigation