Skip to main content
Log in

A quantum-inspired sentiment representation model for twitter sentiment analysis

  • Published:
Applied Intelligence Aims and scope Submit manuscript

Abstract

Sentiment analysis aims to capture the diverse sentiment information expressed by authors in given natural language texts, and it has been a core research topic in many artificial intelligence areas. The existing machine-learning-based sentiment analysis approaches generally focus on employing popular textual feature representation methods, e.g., term frequency-inverse document frequency (tf-idf), n-gram features, and word embeddings, to construct vector representations of documents. These approaches can model rich syntactic and semantic information, but they largely fail to capture the sentiment information that is central to sentiment analysis. To address this issue, we propose a quantum-inspired sentiment representation (QSR) model. This model can not only represent the semantic content of documents but also capture the sentiment information. Specifically, since adjectives and adverbs are good indicators of subjective expression, this model first extracts sentiment phrases that match the designed sentiment patterns based on adjectives and adverbs. Then, both single words and sentiment phrases in the documents are modeled as a collection of projectors, which are finally encapsulated in density matrices through maximum likelihood estimation. These density matrices successfully integrate the sentiment information into the representations of documents. Extensive experiments are conducted on two widely used Twitter datasets, which are the Obama-McCain Debate (OMD) dataset and the Sentiment140 Twitter dataset. The experimental results show that our model significantly outperforms a number of state-of-the-art baselines and demonstrate the effectiveness of the QSR model for sentiment analysis.

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

Similar content being viewed by others

References

  1. Asghar MZ, Ahmad S, Marwat A, Kundi FM (2015) Sentiment analysis on youtube: A brief survey. arXiv:1511.09142

  2. Baccianella S, Esuli A, Sebastiani F (2010) Sentiwordnet 3.0: an enhanced lexical resource for sentiment analysis and opinion mining. In: LREC, vol 10, pp 2200–2204

  3. Bai X (2011) Predicting consumer sentiments from online text. Decis Support Syst 50(4):732–742

    Article  Google Scholar 

  4. Baroni M, Zamparelli R (2010) Nouns are vectors, adjectives are matrices: Representing adjective-noun constructions in semantic space. In: Proceedings of the 2010 Conference on Empirical Methods in Natural Language Processing. Association for Computational Linguistics, pp 1183–1193

  5. Bird S, Klein E, Loper E (2009) Natural language processing with Python: analyzing text with the natural language toolkit. O’Reilly Media Inc.

  6. Boiy E, Hens P, Deschacht K, Moens MF (2007) Automatic sentiment analysis in on-line text. In: ELPUB, pp 349–360

  7. Bourbaki N (1966) Elements of mathematics. general topology. part 1. Hermann, Paris, pp 130–132

    MATH  Google Scholar 

  8. Cambria E (2016) Affective computing and sentiment analysis. IEEE Intell Syst 31(2):102–107

    Article  Google Scholar 

  9. Catal C, Nangir M (2017) A sentiment classification model based on multiple classifiers. Appl Soft Comput 50:135–141

    Article  Google Scholar 

  10. Chaovalit P, Zhou L (2005) Movie review mining: a comparison between supervised and unsupervised classification approaches. In: 2005. HICSS’05. Proceedings of the 38th Annual Hawaii International Conference on System Sciences. IEEE, pp 112c–112c

  11. Church KW, Hanks P (1990) Word association norms, mutual information, and lexicography. Comput linguistics 16(1):22–29

    Google Scholar 

  12. Diakopoulos NA, Shamma DA (2010) Characterizing debate performance via aggregated twitter sentiment. In: Proceedings of the SIGCHI Conference on Human Factors in Computing Systems. ACM, pp 1195–1198

  13. Giatsoglou M, Vozalis MG, Diamantaras K, Vakali A, Sarigiannidis G, Chatzisavvas KC (2017) Sentiment analysis leveraging emotions and word embeddings. Expert Syst Appl 69:214–224

    Article  Google Scholar 

  14. Go A, Bhayani R, Huang L (2009) Twitter sentiment classification using distant supervision. CS224n Proj Report Stanf 1(2009):12

    Google Scholar 

  15. Goncalves DS, Gomes-Ruggiero MA, Lavor C (2013) Global convergence of diluted iterations in maximum-likelihood quantum tomography. arXiv:1306.3057

  16. Gudder SP (2014) Quantum probability. Academic Press, New York

    MATH  Google Scholar 

  17. Hatzivassiloglou V, McKeown KR (1997) Predicting the semantic orientation of adjectives. In: Proceedings of the eighth conference on European chapter of the Association for Computational Linguistics. Association for Computational Linguistics, pp 174–181

  18. Hatzivassiloglou V, Wiebe J (2000) Effects of adjective orientation and gradability on sentence subjectivity. In: Proceedings of the 18th conference on Computational linguistics-Volume 1. Association for Computational Linguistics, pp 299–305

  19. He Y, Zhou D (2011) Self-training from labeled features for sentiment analysis. Inf Process Manag 47 (4):606–616

    Article  Google Scholar 

  20. Hu M, Liu B (2004) Mining and summarizing customer reviews. In: Proceedings of the tenth ACM SIGKDD international conference on Knowledge discovery and data mining. ACM, pp 168–177

  21. Kawakami K (2008) Supervised sequence labelling with recurrent neural networks. Ph.D. thesis, PhD thesis. Ph. D. thesis Technical University of Munich

  22. Khan AZ, Atique M, Thakare V (2015) Combining lexicon-based and learning-based methods for twitter sentiment analysis. International Journal of Electronics, Communication and Soft Computing Science & Engineering (IJECSCSE), pp 89

  23. Kim Y (2014) Convolutional neural networks for sentence classification. arXiv:1408.5882

  24. Kouloumpis E, Wilson T, Moore JD (2011) Twitter sentiment analysis: The good the bad and the omg!. Icwsm 11(538-541):164

    Google Scholar 

  25. Le Q, Mikolov T (2014) Distributed representations of sentences and documents. In: Proceedings of the 31st International Conference on Machine Learning (ICML-14), pp 1188–1196

  26. Lee S, Jin X, Kim W (2016) Sentiment classification for unlabeled dataset using doc2vec with jst. In: Proceedings of the 18th Annual International Conference on Electronic Commerce: e-Commerce in Smart connected World. ACM, pp 28

  27. Li J, Zhang P, Song D, Hou Y (2016) An adaptive contextual quantum language model. Physica A: Stat Mech Appl 456:51–67

    Article  Google Scholar 

  28. Liu B (2010) Sentiment analysis and subjectivity. In: Handbook of natural language processing. 2nd edn. Chapman and hall/CRC, pp 627–666

  29. Martineau J, Finin T (2009) Delta tfidf: an improved feature space for sentiment analysis. Icwsm 9:106

    Google Scholar 

  30. 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 

  31. Mikolov T, Chen K, Corrado G, Dean J (2013) Efficient estimation of word representations in vector space. arXiv:1301.3781

  32. Narasimhachar V, Poostindouz A, Gour G (2016) Uncertainty, joint uncertainty, and the quantum uncertainty principle. J Phys 18(3):033019

    MathSciNet  Google Scholar 

  33. Neethu M, Rajasree R (2013) Sentiment analysis in twitter using machine learning techniques. In: 2013 fourth international conference on Computing, communications and networking technologies (ICCCNT). IEEE, pp 1–5

  34. Neumann JV (2013) Mathematische grundlagen der quantenmechanik, vol 38. Springer, Berlin

    Google Scholar 

  35. Pak A, Paroubek P (2010) Twitter as a corpus for sentiment analysis and opinion mining. In: LREC, vol 10

  36. Pang B, Lee L (2005) Seeing stars: Exploiting class relationships for sentiment categorization with respect to rating scales. In: Proceedings of the 43rd annual meeting on association for computational linguistics. Association for Computational Linguistics, pp 115–124

  37. Pang B, Lee L, Vaithyanathan S (2002) Thumbs up?: sentiment classification using machine learning techniques. In: Proceedings of the ACL-02 conference on Empirical methods in natural language processing-Volume 10. Association for Computational Linguistics, pp 79–86

  38. Pang B, Lee L et al (2008) Opinion mining and sentiment analysis. Found Trends®; Inf Retr 2(1–2):1–135

    Article  Google Scholar 

  39. Pedregosa F, Varoquaux G, Gramfort A, Michel V, Thirion B, Grisel O, Blondel M, Prettenhofer P, Weiss R, Dubourg V, Vanderplas J, Passos A, Cournapeau D, Brucher M, Perrot M, Duchesnay E (2011) Scikit-learn: Machine learning in Python. J Mach Learn Res 12:2825–2830

    MathSciNet  MATH  Google Scholar 

  40. Pennington J, Socher R, Manning CD (2014) Glove: Global vectors for word representation. In: EMNLP, vol 14, pp 1532–1543

  41. Polanyi L, Zaenen A (2006) Contextual valence shifters. In: Computing attitude and affect in text: Theory and applications. Springer, pp 1–10

  42. Raghuvanshi N, Patil J (2016) A brief review on sentiment analysis. In: International Conference on Electrical, electronics, and optimization techniques (ICEEOT). IEEE, pp 2827–2831

  43. Řeháček J, Hradil Z, Knill E, Lvovsky A (2007) Diluted maximum-likelihood algorithm for quantum tomography, vol 75

  44. Rehurek R, Sojka P (2010) Software framework for topic modelling with large corpora. In: Inproceedings of the LREC 2010 Workshop on New Challenges for NLP Frameworks. Citeseer

  45. Siersdorfer S, Minack E, Deng F, Hare J (2010) Analyzing and predicting sentiment of images on the social web. In: Proceedings of the 18th ACM international conference on Multimedia. ACM, pp 715–718

  46. Socher R, Pennington J, Huang EH, Ng AY, Manning CD (2011) Semi-supervised recursive autoencoders for predicting sentiment distributions. In: Proceedings of the conference on empirical methods in natural language processing. Association for Computational Linguistics, pp 151–161

  47. Sordoni A, Nie JY, Bengio Y (2013) Modeling term dependencies with quantum language models for ir. In: Proceedings of the 36th international ACM SIGIR conference on Research and development in information retrieval. ACM, pp 653–662

  48. Stone PJ, Dunphy DC, Smith MS (1966) The general inquirer: A computer approach to content analysis

  49. Taboada M, Brooke J, Tofiloski M, Voll K, Stede M (2011) Lexicon-based methods for sentiment analysis. Comput Linguistics 37(2):267–307

    Article  Google Scholar 

  50. Thelwall M, Buckley K, Paltoglou G, Cai D, Kappas A (2010) Sentiment strength detection in short informal text. J Amer Soc Inf Sci Technol 61(12):2544–2558

    Article  Google Scholar 

  51. Tripathy A, Agrawal A, Rath SK (2016) Classification of sentiment reviews using n-gram machine learning approach. Expert Syst Appl 57:117–126

    Article  Google Scholar 

  52. Turney PD (2002) Thumbs up or thumbs down?: semantic orientation applied to unsupervised classification of reviews. In: Proceedings of the 40th annual meeting on association for computational linguistics. Association for Computational Linguistics, pp 417–424

  53. Turney PD, Pantel P (2010) From frequency to meaning: Vector space models of semantics. J Artif Intell Res 37:141–188

    Article  MathSciNet  MATH  Google Scholar 

  54. Van Rijsbergen CJ (2004) The geometry of information retrieval. Cambridge University Press, Cambridge

    Book  MATH  Google Scholar 

  55. Voll K, Taboada M (2007) Not all words are created equal: Extracting semantic orientation as a function of adjective relevance. In: Australasian joint conference on artificial intelligence. Springer, pp 337–346

  56. Wang P, Hou Y, Li J, Zhang Y, Song D, Li W (2017) A quasi-current representation for information needs inspired by two-state vector formalism. Physica A: Statistical Mechanics and its Applications

  57. Wang Y, Huang M, Zhao L et al (2016) Attention-based lstm for aspect-level sentiment classification. In: Proceedings of the 2016 conference on empirical methods in natural language processing, pp 606–615

  58. Wiebe J (2000) Learning subjective adjectives from corpora. In: AAAI/IAAI, pp 735–740

  59. Wilson T, Wiebe J, Hoffmann P (2005) Recognizing contextual polarity in phrase-level sentiment analysis. In: Proceedings of the conference on human language technology and empirical methods in natural language processing. Association for Computational Linguistics, pp 347–354

  60. Ye Q, Zhang Z, Law R (2009) Sentiment classification of online reviews to travel destinations by supervised machine learning approaches. Expert Syst Appl 36(3):6527–6535

    Article  Google Scholar 

  61. Yessenalina A, Cardie C (2011) Compositional matrix-space models for sentiment analysis. In: Proceedings of the Conference on Empirical Methods in Natural Language Processing. Association for Computational Linguistics, pp 172–182

  62. Yin Y, Jin Z (2015) Document sentiment classification based on the word embedding

  63. Yuan J, Mcdonough S, You Q, Luo J (2013) Sentribute: image sentiment analysis from a mid-level perspective. In: Proceedings of the Second International Workshop on Issues of Sentiment Discovery and Opinion Mining. ACM, p 10

  64. Zhang Y (2018) Maincode of QuantumSentimentRepresentModel. https://data.mendeley.com/submissions/evise/edit/npvgfsy4c4?submission_id=S0965-9978(18)30673-2&token=7086ac77-f45f-4164-b7ec-682386e3a630/

Download references

Acknowledgements

This work is supported by The National Key Research and Development Program of China (grant No. 2018YFC0831700), Natural Science Foundation of China (grant No. U1636203), Major Project of Zhejiang Lab (grant No. 2019DH0ZX01), and the European Union’s Horizon 2020 Research and Innovation Programme under the Marie Skłodowska-Curie grant agreement No 721321.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Dawei Song.

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

Zhang, Y., Song, D., Zhang, P. et al. A quantum-inspired sentiment representation model for twitter sentiment analysis. Appl Intell 49, 3093–3108 (2019). https://doi.org/10.1007/s10489-019-01441-4

Download citation

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10489-019-01441-4

Keywords

Navigation