Sentiment Analysis from Social Media Data in Code-Mixed Indian Languages Using Machine Learning Classifiers with TF-IDF and Weighted Word Features
摘要
Analyzing sentiments from code-mixed languages is a challenging task, so in this research we used social media data in code-mixed Dravidian languages (Malayalam-English, Tamil-English) and code-mixed Indo-Aryan languages (Hindi-English, Bengali-English) for sentiment analysis. We have investigated that for all four code-mixed Indian languages, our designed Weighted Word Unigram feature helps in increasing the accuracy of results in comparison with TF-IDF Char, TF-IDF Word, and TF-IDF Combine features for the n-gram range of (1,1), (1,2), and (1,3). The experiment shows that our Weighted Word Unigram (WWU) features are half in quantity when compared with the TF-IDF Word and TF-IDF Combine features for the (1,2) and (1,3) n-gram ranges for every language. Further experiments added that the Weighted Word Unigram features predicted more values in “offensive” and “negative” classes for code-mixed Dravidian languages and code-mixed Indo-Aryan languages, respectively. The dataset for code-mixed Dravidian languages were taken from the HASOC 2020 shared task having “offensive” and “not-offensive” sentiments, and for code-mixed Indo-Aryan languages having “positive” and “negative” sentiments, taken from the SAIL 2017 shared tasks. To train features, we apply a set of machine learning classifiers, namely multinomial Naive Bayes, support vector machine, logistic regression, and random forest classifier. The performance of classifiers was evaluated using precision, recall, and accuracy. For all four code-mixed languages, the designed Weighted Word Unigram (WWU) feature trained with MNB was found to be the best performing, with an accuracy score of 0.75, 0.88, 0.77, and 0.79 for Malayalam-English, Tamil-English, Hindi-English, and Bengali-English, respectively.