Performance Study of N-grams in the Analysis of Sentiments

https://doi.org/10.46481/jnsps.2021.201

Authors

  • O. E. Ojo Instituto Politécnico Nacional, Natural Language and Text Processing Laboratory, Centro de Investigacion en Computación, CDMX, Mexico
  • A. Gelbukh Instituto Politécnico Nacional, Natural Language and Text Processing Laboratory, Centro de Investigacion en Computación, CDMX, Mexico
  • H. Calvo Instituto Politécnico Nacional, Natural Language and Text Processing Laboratory, Centro de Investigacion en Computación, CDMX, Mexico
  • O. O. Adebanji Instituto Politécnico Nacional, Natural Language and Text Processing Laboratory, Centro de Investigacion en Computación, CDMX, Mexico

Keywords:

ngrams, economic texts, machine learning, deep learning, sentiment analysis

Abstract

In this work, a study investigation was carried out using n-grams to classify sentiments with different machine learning and deep learning methods. We used this approach, which combines existing techniques, with the problem of predicting sequence tags to understand the advantages and problems confronted with using unigrams, bigrams and trigrams to analyse economic texts. Our study aims to fill the gap by evaluating the performance of these n-grams features on different texts in the economic domain using nine sentiment analysis techniques and found more insights. We show that by comparing the performance of these features on different datasets and using multiple learning techniques, we extracted useful intelligence. The evaluation involves assessing the precision, recall, f1-score and accuracy of the function output of the several machine learning algorithms proposed. The methods were tested using Amazon, IMDB, Reuters, and Yelp economic review datasets and our comprehensive experiment shows the effectiveness of n-grams in the analysis of sentiments.

Dimensions

H. Gómez-Adorno, I. Markov, G. Sidorov, J. Posadas-Durán, M. A. Sanchez-Perez, & L. Chanona-Hernandez, “Improving feature representation based on a neural network for author profiling in social media texts”, Computational Intelligence and Neuroscience 2016 (2016) 1638936. DOI: https://doi.org/10.1155/2016/1638936

O. Kolesnikova & A. Gelbukh, “A study of lexical function detection with word2vec and supervised machine learning”, Journal of Intelligent & Fuzzy Systems 39 (2020) 1993. DOI: https://doi.org/10.3233/JIFS-179866

S. Poria, E. Cambria, & A. Gelbukh, “Aspect extraction for opinion mining with a deep convolutional neural network”, Knowledge-Based System 108 (2016) 42. DOI: https://doi.org/10.1016/j.knosys.2016.06.009

O. E. Ojo, A. Gelbukh, H. Calvo, O. O. Adebanji, & G. Sidorov, “Sentiment detection in economics texts”, Advances in Computational Intelligence @ MICAI 2020 12469 (2020) 271. DOI: https://doi.org/10.1007/978-3-030-60887-3_24

T. Lugo-Garcia,A. Gelbukh, & G. Sidorov, “Unsupervised learning of word combinations for syntactic disambiguation”, Avances en la Ciencia de la Computación. Proceedings of the Workshop on Human Language Technologies at the 5th Mexican International Conference on Computer Science, ENC-2004 (2004) 311.

A. Gelbukh & O. Kolesnikova, “Supervised machine learning for predicting the meaning of verb-noun combinations in Spanish” MICAI 2010. Lecture Notes in Artificial Intelligence 6438 (2010) 196 DOI: https://doi.org/10.1007/978-3-642-16773-7_17

O. Juárez Gambino & H. Calvo, “Predicting emotional reactions to news articles in social networks”, Computer Speech & Language 58 (2019) 280. DOI: https://doi.org/10.1016/j.csl.2019.03.004

H. Gómez-Adorno, R. Fuentes-Alba, I. Markov, G. Sidorov & A. Gelbukh, “A convolutional neural network approach for gender and language variety identification”, Journal of Intelligent & Fuzzy Systems 36 (2019) 4845. DOI: https://doi.org/10.3233/JIFS-179032

P. Pakray, A. Pal, G. Majumder, & A. Gelbukh, “Resource building and parts-of-speech (pos) tagging for the mizo language”, 14th Mexican International Conference on Artificial Intelligence, MICAI 2015 (2015) 3. DOI: https://doi.org/10.1109/MICAI.2015.7

S. N. Galicia-Haro, A. Gelbukh, & I. A. Bolshakov, “Identification of composite named entities in a spanish textual database”, 9th International Conference on Applications of Natural Languages to Information Systems, Salford, UK 3136 (2004) 395. DOI: https://doi.org/10.1007/978-3-540-27779-8_37

M. Pekka, A. Sinha, P. Korhonen, J. Wallenius, & P. Takala, “Good debt or bad debt: Detecting semantic orientations in economic texts”, Journal of the Association for Information Science and Technology 65 (2014) 782. DOI: https://doi.org/10.1002/asi.23062

G. Sidorov, F. Velasquez, E. Stamatatos, A. Gelbukh & L. Chanona Hernández, “Syntactic n-grams as machine learning features for natural language processing”, Expert Systems with Applications 41 (2014) 853. DOI: https://doi.org/10.1016/j.eswa.2013.08.015

S. Poria, N. Majumder, D. Hazarika, E. Cambria, A. Gelbukh & A. Hussain, “Multimodal sentiment analysis: Addressing key issues and setting up the baselines”, IEEE Intelligent Systems 33 (2018) 17. DOI: https://doi.org/10.1109/MIS.2018.2882362

S. T. Aroyehun & A. Gelbukh, “Aggression detection in social media: Using deep neural networks, data augmentation, and pseudo labeling”, Proceedings of the First Workshop on Trolling, Aggression and Cyberbullying (TRAC-1) Santa Fe, USA (2018) 90.

D. Kotzias, M. Denil, N. de Freitas & P. Smyth, “From group to individual labels using deep features”, KDD 2015 (2015) 597. DOI: https://doi.org/10.1145/2783258.2783380

V. Athanasiou & M. Maragoudakis, “A novel, gradient boosting framework for sentiment analysis in languages where NLP resources are not plentiful: A case study for modern Greek”, Algorithms 10 (2017) 34. DOI: https://doi.org/10.3390/a10010034

Published

2021-11-29

How to Cite

Ojo, O. E., Gelbukh, A., Calvo, H., & Adebanji, O. O. . (2021). Performance Study of N-grams in the Analysis of Sentiments. Journal of the Nigerian Society of Physical Sciences, 3(4), 477–483. https://doi.org/10.46481/jnsps.2021.201

Issue

Section

Original Research