Sentimental Analysis using Capsule Network with Gravitational Search Algorithm


  • V Diviya Prabha Department of Computer Science Periyar University, Salem, India
  • R Rathipriya Department of Computer Science Periyar University, Salem, India



Deep Learning, Capsule Network, Machine Learning, Sentimental Classification


Day by day the recent development of communication and the data on the web is increasing tremendously. Moreover, the use of social media among people to express their opinion has greatly increased. Therefore, analyzing this textual data using sentimental analysis techniques can be very helpful in capturing and categorizing people’s opinions. This work aims to propose an algorithm which is combination of Capsule Network (CN) with Gravitational Search Algorithm (GSA) to analyze people’s sentiments from twitter data. In text data mining, CN works to an excessive extent for sentiment analysis compared with other models. The performance of the proposed approach is studied using existing benchmark datasets and COVID-19 twitter posts. The results showed that the proposed approach could automatically classify the sentiments with high performance. It works better compared to other algorithms and results also encourage further research.


Download data is not yet available.

Author Biographies

V Diviya Prabha, Department of Computer Science Periyar University, Salem, India

V. Diviya Prabha is a Ph.D. student at the Periyar University since 2016. He has received his B.Sc in Computer Science in 2009. She has completed MCA degree and M.Phil from Periyar University during 2012 and 2013. Her Ph.D. work centers on Data Mining and discusses the Text Mining to develop a solution for sentimental analysis in social media.

R Rathipriya, Department of Computer Science Periyar University, Salem, India

R. Rathipriya received his B.Sc and M.Sc degrees in Computer Science from Periyar Univeristy, Tamil Nadu, India; M.Phil and MCA degree from Periyar University and Ph.D. degree in Computer Science from Bharathiyar Univeristy, Tamil Nadu, India. Dr. R. Rathipriya is Assistant Professor at Periyar University in Department of Computer Science from 2008. She was Principal Invigestor for UGC MRP funding agency. She is expert in Web Mining, has acquired a solid experience in Bioinformatics.


Castro, R.; Kuffó, L.; Vaca, C. Back(2017) Predicting venezuelan states political election results through twitter. In Proceedings of the Fourth International Conference on e Democracy & eGovernment (ICEDEG), Quito, Ecuador, 19–21 April 2017; pp. 148–153.

Ali Hasan , Sana Moin , Ahmad Karim and Shahaboddin Shamshirband.(2018). Machine Learning-Based Sentiment Analysis for Twitter Accounts, Mathematical and Computational Application, 23, 11.

Lingyu Meng, Zhijie Sasha Dong. (2020). Natural Hazards Twitter Dataset,Social and Information Networks.

Pete Burnap, Omer F. Rana. (2013). Detecting tension in online communities with computational Twitter analysis, Technological Forecasting & Social Change, Elsevier.

V. Diviya Prabha, R. Rathipriya (2013). Biclustering of web usage data using Gravitational Search Algorithm, International Conference on Pattern Recognition, Informatics and Mobile Engineering, IEEE.

Esmat Rashedi, Hossein Nezamabadi-pour. (2009) GSA: A Gravitational Search Algorithm, Information Sciences 179, Elsevier.

Hongping Hu, Xiaxia Cui.(2017).Two Kinds of Classifications Based on Improved Gravitational Search Algorithm and Particle Swarm Optimization Algorithm.

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: Stroudsburg, PA, USA, pp. 79–86.

Sunir Gohil, Sabine Vuik. (2018). Sentiment Analysis of Health Care Tweets: Review of the Methods Used, JMIR Public Health Surveillance.

Yujiao, L.; Fleyeh, H. (2018). Twitter Sentiment Analysis of New IKEA Stores Using Machine Learning. In Proceedings of the International Conference on Computer and Applications, Beirut, Lebanon, 25–26 July.

Jaspreet Singh, Gurvinder Singh. (2017). Optimization of sentiment analysis using machine learning classifiers, Human-centric Computing and Information Sciences.

Conneau A, Schwenk, H, Barrault, L; Lee Cam, Y. (2016). Very Deep convolutional networks for natural language processing, axiv.

M. Trupthi; Suresh Pabboju. (2017). Sentiment Analysis on Twitter Using Streaming API, IEEE.

Walter HugoLopez Pinaya, Sandra Vinera. (2020).Convolutional neural networks, Science Direct.

Changyi Ma, Wenye (2020). LiSparse Binary Optimization for Text Classification via Frank Wolfe Algorithm, ACM.

Mehreen Naz, Kashif Zafar. (2019). Ensemble Based Classification of Sentiments Using Forest Optimization Algorithm.

Mohamed AtefMosa, Real-time data text mining based on Gravitational Search Algorithm, Expert System with Applications, Elesiver.

Jaeyoung Kim, Sion Jang, (2020), Text classification using capsules, Neurocomputing, Elsevier.

Lai, S.; Xu, L.; Liu, K.; Zhao, J. (2015). Recurrent convolutional neural networks for text classification. In Proceedings of the Twenty-Ninth AAAI Conference on Artificial Intelligence AAAI Press: Austin, TX, USA, pp. 2267–2273.

Cheng, J.; Dong, L.; Lapata, M. (2016). Long short-term memory-networks for machine reading. arXiv:1601.06733.

Jaeyoung Kim, Sion Jang. (2020). Text classification using capsules, Neurocomputing.

Xian Zhong, Jinhang Liu, Shuqin Chen. (2020). An emotion classification algorithm based on SPT-CapsNet, Deep Learning and Neutral Computing for Intelligent Sensing and Control, Neural Computing and Applications.

Yongping Du, Xiaozheng Zhao (2019). A Novel Capsule Based Hybrid Neural Network for Sentiment Classification, IEEE.

Zhao W, Ye J, Yang M, Lei Z, Zhang S, Zhao Z. (2018). Investigating capsule networks with dynamic routing for text classification. ArXiv.

Ekenga, C.C.; McElwain, C.-A.; Sprague, N. Examining Public Perceptions about Lead in School Drinking Water: A Mixed-Methods Analysis of Twitter Response to an Environmental Health Hazard. Int. J. Environ. Res. Public Health 2018, 15, 162. [CrossRef] [PubMed].

Bassari Opinion Mining of Movie Review using Hybrid Method of Support Vector Machine and Particle Swarm Optimization.

Silva, J; Coheur, L; Mendes, A.C; Wichert, A. From symbolic to sub-symbolic information in question classification. Artif. Intell Rev. 2011, 35, 137–154.

Tripathy, A.; Agrawal, A; Rath, S.K. Classification of sentiment reviews using n-gram machine learning approach, Expert System Appl. 2016, 57, 117–126.

Neethu, M; Rajasree R. Sentiment analysis in twitter using machine learning approaches and semantic analysis. In Proceedings of the 2014 Seventh International Conference on Contemporary Computing (IC3), Nodia, India, 7–9 August 201, pp. 1–5.