Creation of Corpus and analysis in Code-Mixed K annada- E nglish T witter data for Emotion Prediction (2020)

Abstract: Emotion prediction is a critical task in the field of Natural Language Processing (NLP). There has been a significant amount of work done in emotion prediction for resource-rich languages. There has been work done on code-mixed social media corpus but not on emotion prediction of Kannada-English code-mixed Twitter data. In this paper, we analyze the problem of emotion prediction on corpus obtained from code-mixed Kannada-English extracted from Twitter annotated with their respective ‘Emotion’ for each tweet. We experimented with machine learning prediction models using features like Character N-Grams, Word N-Grams, Repetitive characters, and others on SVM and LSTM on our corpus, which resulted in an accuracy of 30% and 32% respectively.

## introduction identification and analysis of emotions in user-generated data in social media like twitter, facebook, reddit, etc., is essential in understanding the daily trends and human behavior. emotion prediction aims at identifying and analyzing such emotions like 'happy, 'sad,' 'angry,' 'fear,' 'surprise,' and 'disgust' types present in the text. original works were focussed more on monolingual text @xcite due to the large-scale availability of monolingual texts. india has twenty-three significant languages with over seven hundred and twenty dialects. the majority of people are multilingual, and they tend to mix words from different languages in speech and written text. this method of interchanging languages is commonly addressed by terms 'code-switching' and 'code-mixing' as described by @xcite . code-mixing refers to the use of words from different languages in the same sentence. code-switching refers to the use of words or phrases from different languages within the same speech context. we can understand the difference between code-switching and code-mixing from the positions of altered elements. code-mixing refers to the intrasentential modification of codes, whereas code-switching refers to the intersentential modification of codes. we observe code-switching and code-mixing frequently on social media platforms. since the available resources are limited for kannada-english codemixed text, we primarily focus on the creation of corpus and annotating the code-mixed tweets with their respective emotions, in this paper. here are some examples from a corpus of code-mixed kannada-english generated from twitter data and its translation in english. t1: "nam placement officer helidda ee thara helidre ond company lu kelsa sigalla anta...i had 2 offers before i left college, ondu it innondu core..." translation: "our placement officer said,'if you talk like this, you wont get a single job.' i had 2 offers before i left college. one was it, the other was core." t2: "eshwarappa avarey neevu petrol bunk ge hogilla ansuthe. me nimmannu karkondu hogthini" translation: "eshwarappa, it looks like you did not go to the petrol bunk. i will take you there." ## background and related work there has been a plethora of research done on emotion prediction in resource-rich languages. the same is not true for the kannada-english code-mixed corpus. @xcite has done the work on the kannada pos tagger with probabilistic classifiers. ketan kumar (2018) presented work on the kannada pos tagger using machine learning models, and amarappa (2013) worked on ner and classification in the kannada language. the following are some works in code-mixed indian languages. antony (2010) worked on a kernel-based pos tagger for kannada. lakshmi (2017) presented an automatic identification system for code-mixed kannada-english social media text, and @xcite worked on sentiment analysis for code-mixed kannada-english social media text. @xcite worked on domain-based sentiment analysis in the regional language which is kannada. kumar (2015) has worked on the analysis of users' sentiments from kannada web documents. when it comes to emotion prediction, we believe the corpus we created is the first kannada-english code-mixed corpus with emotion tags. ## corpus creation and annotation the corpus created consists of kannada-english code mixed tweets gathered from twitter using twintproject foot_0 -an opensource twitter intelligence tool. we have collected tweets from the past 5-8 years based on various topics such as movies, sports, celebrities, politics, trending hashtags, social events, not limited to a particular domain. we can find the topics list in the appendices section of this paper. we have done extensive pre-processing of tweets and retrieved them in json format. this json formatted data includes metadata like urls, usernames, retweets, tweet ids, likes, full names, and others. ## corpus statistics we have collected more than 3,34,600 tweets from twitter using twintproject. we obtained 6396 kannada-english code-mixed tweets after extensive cleaning of the corpus. we made sure that all the words in the corpus are in roman script. ## system architecture this section explains the emotion prediction of the annotated corpus in the code-mixed kannada-english tweets. we performed experiments using machine learning models to classify emotions into happy, angry, sad, fear, disgust, surprise and 'multiple emotion'. ## results and discussions we experimented with prediction models, svm and lstm model on our corpus. ## conclusion and future work our findings are as follows : for future work, the corpus can be enriched by also giving the respective pos tags for the words. an increase in the size of the corpus helps in more applications of code-mixed indian languages. we can adapt the problem for emotion prediction in code-mixed data containing more than two languages from multilingual societies.