UKRAINIAN LANGUAGE TWEETS ANALYSIS TECHNOLOGY FOR PUBLIC OPINION DYNAMICS CHANGE PREDICTION BASED ON MACHINE LEARNING
DOI:
https://doi.org/10.15588/1607-3274-2023-2-11Keywords:
tweet, Ukrainian language, public opinion; trend, clustering, stemming, lemmatization, similarity of clustersAbstract
Context. Automation of public opinion research will allow not only to reduce the amount of manual work, but also to obtain time slices of the results without additional efforts. Since direct interaction with respondents should be avoided, public opinion should be analyzed based on the sources of its free expression. Social networks are great for this role, as their people freely publish their thoughts or emotionally truthfully react to published information about certain events. Statistics show that data from social networks is not enough to obtain a full-fledged result, because a significant percentage of people do not use social networks. However, the automation of the study of even such a stratum of the population is already a good result for analyzing the dynamics of changes in public opinion in accordance with events in the country/world and, accordingly, for correcting the processes of public administration in the future.
Objective of the study is to develop a technology for analyzing the flow of Ukrainian-language content in social networks for public opinion research based on finding clustered thematic groups of tweets.
Method. The article develops a technology for finding tweet trends based on clustering, which forms a data stream in the form of short representations of clusters and their popularity for further research of public opinion. An effective approach to tweet collection, filtering, cleaning and pre-processing based on a comparative analysis of Bag of Words, TF-IDF and BERT algorithms is described. The impact of stemming and lemmatization on the quality of the obtained clusters was determined. And optimal combinations of clustering methods (K-Means, Agglomerative Hierarchical Clustering and HDBSCAN) and vectorization of tweets were found based on the analysis of 27 clusterings of one data sample. The method of presenting clusters of tweets in a short format is selected.
Results. Algorithms using the Levenstein Distance, i.e. fuzz sort, fuzz set and levenshtein, showed the best results. These algorithms quickly perform checks, have a greater difference in similarities, so it is possible to more accurately determine the limit of similarity. According to the results of the clustering, the optimal solutions are to use the HDBSCAN clustering algorithm and the BERT vectorization algorithm to achieve the most accurate results, and to use K-Means together with TF-IDF to achieve the best speed with the optimal result. Stemming can be used to reduce execution time.
Conclusions. In this study, the optimal options for comparing cluster fingerprints among the following similarity search methods were experimentally found: Fuzz Sort, Fuzz Set, Levenshtein, Jaro Winkler, Jaccard, Sorensen, Cosine, Sift4. In some algorithms, the average fingerprint similarity reaches above 70%. 3 effective tools were found to compare their similarity, as they show a sufficient difference between comparisons of similar and different clusters (> 20%). Based on the selected effective methods, trend analysis was successfully performed on 90,000 tweets over 7 days for 5 topics of the week using K-Means and TF-IDF for clustering and vectorization, as well as fuzz sort for cluster fingerprint comparison with a 55% similarity threshold.
References
Ismail M. A., Auda H. A., Elzafrany Y. A. On Time Series Analysis for Repeated Surveys, Journal of Statistical Theory and Applications, 2018, Vol. 17, pp. 587–596. https://doi.org/10.2991/jsta.2018.17.4.1
Mellon J., Prosser C. Twitter and Facebook are not representative of the general population: Political attitudes and demographics of British social media users, Research & Politics, 2017, Vol. 4(3), pp. 1–9. https://doi.org/10.1177/2053168017720008
Han X., Wang J., Zhang M., Wang X. Using Social Media to Mine and Analyze Public Opinion Related to COVID-19 in China, International Journal of Environmental Research and Public Health, 2020, Vol. 17(8), P. 2788. https://doi.org/10.3390/ijerph17082788
Tavoschi L., Quattrone F., D’Andrea E., Ducange P., Vabanesi M., Marcelloni F., Lopalco P. L. Twitter as a sentinel tool to monitor public opinion on vaccination: an opinion mining analysis from September 2016 to August 2017 in Italy, Human Vaccines & Immunotherapeutics, 2020, Vol. 16(5), pp. 1062–1069. https://doi.org/10.1080/21645515.2020.1714311
Ainin S., Feizollah A., Anuar N. B., Abdullah N. A. Sentiment analyses of multilingual tweets on halal tourism Tourism Management Perspectives, 2020, Vol. 34, P. 100658. https://doi.org/10.1016/j.tmp.2020.100658
Twitter Inc. Twitter API. Access mode: https://developer.twitter.com/en/docs/twitter-api
Moh T.-S., Bhagvat S. Clustering of Technology Tweets and the Impact of Stop Words on Clusters, ACM-SE : the 50th Annual Southeast Regional Conference : Tuscaloosa, Alabama, 29–31 March 2012, proceedings. Alabama, ACMSE, 2012, pp. 226–231. https://doi.org/10.1145/2184512.2184566
Mitsch R. SpaCy. Explosion. Industrial-strength Natural Language Processing (NLP) in Python. Access mode: https://github.com/explosion/spaCy
Kupriienko S. Ukrainian-Stopwords. Access mode: https://github.com/skupriienko/Ukrainian-Stopwords
Devlin J., Chang M.-W., Lee K., Toutanova K. BERT: Pretraining of Deep Bidirectional Transformers for Language Understanding, ArXiv, 2018. https://doi.org/10.48550/arXiv.1810.04805
Hugging F. BERT multilingual base model (uncased). Access mode: https://huggingface.co/bert-base-multilingualuncased
Sasirekha K., Baby P. Agglomerative hierarchical clustering algorithm-a, International Journal of Scientific and Research Publications, 2013, Vol. 83(3), P. 83.
McInnes L., Healy J. Accelerated Hierarchical Density Based Clustering, Data Mining Workshops (ICDMW) : International Conference, New Orleans, LA, USA, 18 December 2017 : proceedings. New Orleans, IEEE, 2017, pp. 33–42. https://doi.org/10.1109/ICDMW.2017.12
Campos R., Mangaravite V., Pasquali A., Jorge A., Nunes C., Jatowt A. YAKE! Keyword extraction from single documents using multiple local features, Information Sciences, 2020, Vol. 509, pp. 257–289. https://doi.org/10.1016/j.ins.2019.09.013
Paice C. D. An Evaluation Method for Stemming Algorithms, Research and Development in Information Retrieval, the 17th Annual International ACM SIGIR Conference, Dublin, Ireland, 1994, proceedings. Berlin, Heidelberg, Springer-Verlag, 1994, pp. 42–50.
Makukha A. Stemmers for Ukrainian. Access mode: https://github.com/amakukha/stemmers_ukrainian
Barbaresi A. Simplemma, Zenodo, 2023. https://doi.org/10.5281/zenodo.7555188
Barbaresi A., Hein K. Data-Driven Identification of German Phrasal Compounds, Lecture Notes in Computer Science, 2017, Vol. 10415, pp. 192–200. https://doi.org/10.1007/9783-319-64206-2_22
Barbaresi A. An Unsupervised Morphological Criterion for Discriminating Similar Languages, NLP for Similar Languages, Varieties and Dialects (VArDIal3) : Third Workshop, Osaka, Japan, December 2016 : proceedings. Osaka, ACL Anthology, 2016, pp. 212–220.
Barbaresi A. Bootstrapped OCR error detection for a lessresourced language variant, Natural Language Processing (KONVENS) : 13th Conference, Bochum, Germany, September 2016 : proceedings. Berlin, HAL,2016, pp. 21– 26.
Moulavi D., Jaskowiak P. A., Campello R. J. G. B., Zimek A., Sander J. Density-Based Clustering Validation, Data Mining (SDM) : the 2014 SIAM international conference, Philadelphia, Pennsylvania, USA, 24–26 April 2014: proccedings. Philadelphia: SIAM, 2014, pp. 839–847. https://doi.org/10.1137/1.9781611973440.96
Boon-Itt S., Skunkan Y. Public Perception of the COVID-19 Pandemic on Twitter: Sentiment Analysis and Topic Modeling Study, JMIR Public Health Surveill, 2020, Vol. 6(4), P. e21978. https://doi.org/10.2196/21978
Lwin M. O., Lu J., Sheldenkar A., Schulz P. J., Shin W., Gupta R., Yang Y. Global Sentiments Surrounding the COVID-19 Pandemic on Twitter: Analysis of Twitter Trends, JMIR Public Health Surveill, 2020, Vol. 6(2), P. e19447. https://doi.org/10.2196/19447
Mustakim, Indah R. N. G., Novita R., Kharisma O. B., Vebrianto R., Sanjaya S., Hasbullah, Andriani T., Sari W. P., Novita Y., Rahim R. DBSCAN algorithm: twitter text clustering of trend topic pilkada pekanbaru, Journal of Physics, 2019, Vol. 1363(1), P. 012001. https://doi.org/10.1088/1742-6596/1363/1/012001
Markiv O., Vysotska V., Chyrun L., Voloshyn S., Dyyak I., Panasyuk V. Emotion recognition system project of English newspapers to regional E-business adaptation, Computer science and information technologies : IEEE 17th International conference, Lviv, Ukraine, 10–12 November 2022 : proceedings. Lviv, IEEE, 2022, pp. 392–397. https://doi.org/10.1109/CSIT56902.2022.10000527
Vysotska V., Markiv O., Voloshyn S., Dyyak I., Budz I., Schuchmann V. Sentiment analysis technology of English newspapers quotes based on neural network as public opinion influences identification tool, Computer science and information technologies, IEEE 17th International conference, Lviv, Ukraine, 10–12 November 2022 : proceedings. Lviv: IEEE, 2022, pp. 83–88. https://doi.org/10.1109/CSIT56902.2022.10000627
Vysotska V., Chyrun L., Brodyak O., Mazepa S., Shakleina I., Schuchmann V. NLP tool for extracting relevant information from criminal reports or fakes/propaganda content, Computer science and information technologies : IEEE 17th International conference, Lviv, Ukraine, 10–12 November 2022 : proceedings. Lviv, IEEE, 2022, pp. 93–98. https://doi.org/10.1109/CSIT56902.2022.10000563
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2023 О. А. Прокіпчук, В. А. Висоцька
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Creative Commons Licensing Notifications in the Copyright Notices
The journal allows the authors to hold the copyright without restrictions and to retain publishing rights without restrictions.
The journal allows readers to read, download, copy, distribute, print, search, or link to the full texts of its articles.
The journal allows to reuse and remixing of its content, in accordance with a Creative Commons license СС BY -SA.
Authors who publish with this journal agree to the following terms:
-
Authors retain copyright and grant the journal right of first publication with the work simultaneously licensed under a Creative Commons Attribution License CC BY-SA that allows others to share the work with an acknowledgement of the work's authorship and initial publication in this journal.
-
Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgement of its initial publication in this journal.
-
Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work.