Twitter Text Classification using Convolutional Neural Network Method
Main Article Content
Abstract
Text classification on social media platforms such as Twitter has become increasingly crucial. Convolutional Neural Networks (CNNs) have demonstrated their effectiveness across a range of natural language processing tasks, including text classification. The primary goal of this article is to create a reliable and precise text classification model for Twitter by employing CNNs. The CNN architecture is tailored for the text classification task through the application of one-dimensional convolutions on the word embedding. In this article utilize multiple convolutional layers with diverse kernel sizes to capture various levels of contextual information within the input text. Max-pooling layers are employed to extract the most pertinent features from the convolved results. To assess the performance of the text classification model based on CNNs, this study carry out experiments using a diverse dataset of Twitter messages. The dataset is annotated with various categories such as sentiment (positive, negative). Experimental results demonstrate that the proposed CNN model achieves competitive performance compared to state-of-the-art methods for text classification on Twitter. then compared the proposed model with some ML methods like Logistic Regression (LR), Naive Bayes (NB), Stochastic Gradient Descent (SGD), and k-nearest neighbours (KNN) and got the following accuracy: 98%, 97%, 89%, 83%, and 94%.
Article Details

This work is licensed under a Creative Commons Attribution 4.0 International License.
Tikrit Journal of Pure Science is licensed under the Creative Commons Attribution 4.0 International License, which allows users to copy, create extracts, abstracts, and new works from the article, alter and revise the article, and make commercial use of the article (including reuse and/or resale of the article by commercial entities), provided the user gives appropriate credit (with a link to the formal publication through the relevant DOI), provides a link to the license, indicates if changes were made, and the licensor is not represented as endorsing the use made of the work. The authors hold the copyright for their published work on the Tikrit J. Pure Sci. website, while Tikrit J. Pure Sci. is responsible for appreciate citation of their work, which is released under CC-BY-4.0, enabling the unrestricted use, distribution, and reproduction of an article in any medium, provided that the original work is properly cited.
References
1. Theocharopoulos PC, Tsoukala A, Georgakopoulos SV, Tasoulis SK, Plagianakos VP. Text analysis of COVID-19 tweets. In: Engineering Applications of Neural Networks. 2022. p. 517–528.
2. Zhang F, Fleyeh H, Wang X, Lu M. Construction site accident analysis using text mining and natural language processing techniques. Automation in Construction. 2019;99:238–48. doi: https://doi.org/10.1016/j.autcon.2018.12.016
3. Taye MM. Theoretical understanding of convolutional neural network: Concepts, architectures, applications, future directions. Computation. 2023;11(3).
doi: 10.3390/computation11030052
4. Scott K. The pragmatics of hashtags: Inference and conversational style on Twitter. Journal of Pragmatics. 2015;81:8–20.
https://doi.org/10.1016/j.pragma.2015.03.015
5. Nagar A, Bhasin A, Mathur G. Text classification using gated fusion of n-gram features and semantic features. Computación y Sistemas. 2019;23(3). doi: 10.13053/cys-23-3-3278
6. Agarwal A, Xie B, Vovsha I, Rambow O, Passonneau R. Sentiment analysis of Twitter data. In: Proceedings of the Workshop on Language in Social Media (LSM 2011). 2011. p. 30–8. Available from: https://aclanthology.org/W11-0705
7. Soni S, Chouhan SS, Rathore SS. TextConvoNet: A convolutional neural network based architecture for text classification. Applied Intelligence. 2023;53(11):14249–68.
doi: 10.1007/s10489-022-04221-9
8. Qi CR, Yi L, Su H, Guibas LJ. PointNet++: Deep hierarchical feature learning on point sets in a metric space. In: Advances in Neural Information Processing Systems. 2017;30. Available from: https://proceedings.neurips.cc/paper_files/paper/2017/file/d8bf84be3800d12f74d8b05e9b89836f-Paper.pdf
9. Zafar A, et al. A comparison of pooling methods for convolutional neural networks. Applied Sciences. 2022;12(17). doi: 10.3390/app12178643
10. Aljaloud S. Performance refinement of convolutional neural network architectures for solving big data problems. Tikrit Journal of Pure Science. 2023;28(1):89–95.
doi: 10.25130/tjps.v28i1.1270
11. Hussein DM, Beitollahi H. A hybrid deep learning model to accurately detect anomalies in online social media. Tikrit Journal of Pure Science. 2022;27(5):105–16. doi: 10.25130/tjps.v27i5.24
12. Dang NC, Moreno-García MN, De la Prieta F. Sentiment analysis based on deep learning: A comparative study. Electronics. 2020;9(3):483. doi: 10.3390/electronics9030483
13. Messaoudi C, Guessoum Z, Ben Romdhane L. A deep learning model for opinion mining in Twitter combining text and emojis. Procedia Computer Science. 2022;207:2628–37.
https://doi.org/10.1016/j.procs.2022.09.321
14. Umer M, et al. Impact of convolutional neural network and FastText embedding on text classification. Multimedia Tools and Applications. 2023;82(4):5569–85. doi: 10.1007/s11042-022-13459-x
15. Soni S, Chouhan SS, Rathore SS. TextConvoNet: A convolutional neural network based architecture for text classification. Applied Intelligence. 2022. doi: 10.1007/s10489-022-04221-9
16. Roy PK, Tripathy AK, Das TK, Gao X-Z. A framework for hate speech detection using deep convolutional neural network. IEEE Access. 2020;8:204951–62.
doi: 10.1109/ACCESS.2020.3037073
17. Kaggle. Twitter_Sentiment_Analysis [dataset]. Available from: https://www.kaggle.com/datasets
18. Habeeb MA. Hate speech detection using deep learning [Master’s thesis]. 2021.