Skip to main content

Extract Sentiment from Customer Reviews: A Better Approach of TF-IDF and BOW-Based Text Classification Using N-Gram Technique

  • Conference paper
  • First Online:
Proceedings of International Joint Conference on Advances in Computational Intelligence

Part of the book series: Algorithms for Intelligent Systems ((AIS))

Abstract

To enhance customer and product services, customer reviews play a must-have role for any business organization in the digital era. Business organizations can improve customer and product services to their greatest level by further analyzing the customer’s demands. For this purpose, text mining helps to convert unstructured text into structured form for further analysis. Sentiment analysis is a concept of opinion mining which draws significant advantages by classifying the customer reviews as positive or negative. The principal goal of this paper is to perform opinion classification. Bag of Words (BOW) and Term Frequency-Inverse Document Frequency (TF-IDF) are used as feature extraction techniques along with N-Gram and Random Forest (RF), Support Vector Machine (SVM), and Naive Bayes (NB) and are regarded as machine learning classifiers for reviews classification. Again, voting ensemble classifier has also been applied in order to investigate better performance and customer reviews are considered to accomplish the job. Though all the classifiers and feature extraction techniques achieve good performance, voting ensemble performs better among the classifiers while TF-IDF performs better for feature extraction techniques. From the notable result of the experiment, it can be pointed out that the implemented technique of customer reviews analysis might be an effective use to reshape business products.

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

Access this chapter

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 169.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 219.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info
Hardcover Book
USD 219.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Similar content being viewed by others

References

  1. 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, pp 168–177

    Google Scholar 

  2. Kaviya K, Shanthini KK, Sujithra M (2018) Micro-blogging sentimental analysis on Twitter data using Naïve Bayes machine learning algorithm in Python. Int J Math Comput Sci 4

    Google Scholar 

  3. Fouad MM, Gharib TF, Mashat AS (2018) Efficient Twitter sentiment analysis system with feature selection and classifier ensemble. International conference on advanced machine learning technologies and applications. Springer, Cham, pp 516–527

    Google Scholar 

  4. Qamar AM, Alsuhibany SA, Ahmed SS (2017) Sentiment classification of twitter data belonging to saudi arabian telecommunication companies. Int. J. Adv. Comput. Sci. Appl 1(8):395–401

    Google Scholar 

  5. Elghazaly T, Mahmoud A, Hefny HA (2016) Political sentiment analysis using Twitter data. In: Proceedings of the international conference on internet of things and cloud computing, pp 1–5

    Google Scholar 

  6. Bespalov D, Bai B, Qi Y, Shokoufandeh A (2011) Sentiment classification based on supervised latent n-gram analysis. In: Proceedings of the 20th ACM international conference on information and knowledge management, pp 375–382

    Google Scholar 

  7. Zul MI, Yulia F, Nurmalasari D (2018) Social media sentiment analysis using K-means and Naïve Bayes algorithm. In: 2018 2nd international conference on electrical engineering and informatics (ICon EEI). IEEE, pp 24–29

    Google Scholar 

  8. Venkatesh P (2019) Sentiment analysis classification. https://www.kaggle.com/prasy46/sentiment-analysis-classification. Accessed 30 May 2020

  9. Chowdhury SMH, Ghosh P, Abujar S, Afrin MA, Hossain SA (2019) Sentiment analysis of tweet data: the study of sentimental state of human from tweet text. Emerging technologies in data mining and information security. Springer, Singapore, pp 3–14

    Chapter  Google Scholar 

  10. Ahuja R, Chug A, Kohli S, Gupta S, Ahuja P (2019) The impact of features extraction on the sentiment analysis. Procedia Computer Sci 152:341–348

    Article  Google Scholar 

  11. Sayeedunnissa SF, Hussain AR, Hameed MA (2013) Supervised opinion mining of social network data using a bag-of-words approach on the cloud. In: Proceedings of seventh international conference on bio-inspired computing: theories and applications (BIC-TA 2012). Springer, pp 299–309

    Google Scholar 

  12. Al Amrani Y, Lazaar M, El Kadiri KE (2018) Random forest and support vector machine based hybrid approach to sentiment analysis. Procedia Computer Sci 127:511–520

    Article  Google Scholar 

  13. Khairnar J, Kinikar M (2013) Machine learning algorithms for opinion mining and sentiment classification. Int J Sci Res Publ 3(6):1–6

    Google Scholar 

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

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2021 The Author(s), under exclusive license to Springer Nature Singapore Pte Ltd.

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Hasan, T., Matin, A. (2021). Extract Sentiment from Customer Reviews: A Better Approach of TF-IDF and BOW-Based Text Classification Using N-Gram Technique. In: Uddin, M.S., Bansal, J.C. (eds) Proceedings of International Joint Conference on Advances in Computational Intelligence. Algorithms for Intelligent Systems. Springer, Singapore. https://doi.org/10.1007/978-981-16-0586-4_19

Download citation

Publish with us

Policies and ethics