Word Level Language Identification in Code-mixed K annada- E nglish Texts using Deep Learning Approach (2022)

Abstract: The goal of code-mixed language identification (LID) is to determine which language is spoken or written in a given segment of a speech, word, sentence, or document. Our task is to identify English, Kannada, and mixed language from the provided data. To train a model we used the CoLI-Kenglish dataset, which contains English, Kannada, and mixed-language words. In our work, we conducted several experiments in order to obtain the best performing model. Then, we implemented the best model by using Bidirectional Long Short Term Memory (Bi-LSTM), which outperformed the other trained models with an F1-score of 0.61%.

## introduction language identification is one of the most pernicious challenges in nlp. it is also a difficult task to handle bilingual and multilingual communication data. the prevalence of multilingualism on the internet, and code-mixed text data, has become a popular research topic in nlp. several strategies have been explored over the years to assess and attempt to identify the document's languages and classify each text based on its language from some closed set of known languages. in today's bilingual or multilingual societies, many users regularly switch back and forth between two or more languages when typing and communicating, a process known as code-mixing or code-switching @xcite . although much effort has recently been directed toward this issue, the challenge of language tagging in the code-mixed scenario remains unresolved. the freedom of expression allows users to express and convey their thoughts in real-time all over the world, some people publishing content using more than one language which results in code-mixed text @xcite @xcite . one of the problems related to this issue is translation, given a source text, the trans-lation system fails to translate it into the targeted language due to the linguistic mixture @xcite if it does not include a module to identify the language in the original text. in order to address the problem of word-level language identification, particularly in kannada-english texts coli-kanglish shared a task provided for us. so, as part of this task, we looked at how different state-of-the-art techniques are used and came up with a model to find kannada and english words in code-mixed text. ## related work language identification is one of the oldest nlp problems @xcite , especially in regards to spoken language (house and neuburg, 1977), and code-switching was often considered a substandard use of language. in addition to that, in the recent past, a lot of work has been done in the field of code-mixed data analysis. in order to obtain and understand the state of the art, we have reviewed various related research, from those research works, we selected three papers which are more representative in our opinion. @xcite put into practice multichannel neural networks incorporating cnn and lstm for word-level language identification of code-mixed data. they combined this with a bi-lstm-crf context capture module and obtained an accuracy of 93.28% and 93.32% evaluated on two test data sets respectively. das and gambäck (2014) looked at chat message english bengali and english-hindi corpora to identify language borders at the word level. to determine the level of language blending in the corpora and define the effectiveness of a system designed to distinguish several languages, they proposed a code-mixing index. they primarily employed conventional methods such as character ngrams, dictionaries, and svm classifiers. @xcite investigated methods for word-level language identification in texts with multiple languages. they gathered and manually analyzed a corpus of over 250,000 words of bilingual (primarily non-parallel) content from the web to assess their methodologies. they experimented with different combinations of character unigrams, bigrams, trigrams, 4-grams, 5-grams, and the whole word using a logistic regression classifier. ## task description word level is the smallest unit of code-mixing. the code-mixed data is limited in resources, and the models that help to interpret them are still being developed @xcite . these include identifying hate speech and fake speech, tagging parts of speech, shallow parsing, named entity recognition, etc. an improvement in these tasks can aid in the code-mixed dataset's syntactic and semantic analysis as well as the identification of code-mixed languages. our task is to identify each code-mixed language, where we considered a word-level approach. it is a challenging task because we can not obtain huge data from various domain perspectives to train a model getting and better performance. the task of automatically identifying languages used in a given text is called language identification(li). for many applications, li serves as a preprocessing step. at the word level, li may be thought of as a sequence labeling issue where each word in a sentence is assigned to either a mixed language or one of the languages in a specified set of languages. despite a lot of work being done in li, the problem of li in the code-mixed scenario is still a long way from being resolved. @xcite kannada is one of the dravidian languages spoken in the karnataka state in india. karnataka residents can read, write, and speak kannada, yet many have trouble using the language to send messages or make comments on social media. ## data description while technological limitations like the keyboards of computers and smartphones are one reason, another may be the complexity of framing words with consonant conjuncts. as a result, the majority of individuals who post comments on social media do so using only roman writing or a combination of kannada and roman letters. @xcite . in this task, the primary challenging activity is data collection, which is done by the organizer. we obtained data that contains 19, code-mixed data at the word level. the collected data corpus has two attributes, which are words and tags. for each word, a language identification tag was assigned. the tags were 'en-kn', 'en', 'kn', 'name', 'location' and 'other'. the 'en' and 'kn' were assigned to words that are present in the english language and the kannada languages, respectively. the 'en-kn' is assigned to a word that contains both english and kannada. the 'name' tag was assigned to any type of named entity.' location' was assigned to a word that can refer to a place, and the rest of the words are assigned the 'other' tag. figure 1 depicts each tag percentage in our task. the tags are not balanced, as seen in the above figure 1 , which could result in an inaccurate li outcome indicating, high bias and low variance when a model is unable to capture the underlying pattern of each tags. it occurs when we try to build a linear model using a nonlinear one or when we have very few tags to build an appropriate model. ## system description we used torch, a deep learning framework, to train and develop our model. popular libraries for neural figure 2: data-set size ## experiments and results in this task, we explored techniques for performing language identification at the word level in the codemixed language. in order to train and build a better model we have conducted various techniques. from the deep learning side, we built and trained a basic character-level rnn to identify words. character level rnns read words as a sequence of characters, producing predictions and hidden states at each step and feeding their most recent hidden state, to the preceding step. rnn was often used as a building block in more recent neural networks to identify languages. we implemented both basic unidirectional lstm model and bi-lstm models for code-mixed language identification with and without attention. the model started with an embedding layer, then two layers of bi-lstm, and finally, an attention. following this attention layer was a dense layer with relu activation. then our model identified itself with the help of a dense layer with softmax activation. various experiments revealed that bi-lstm performed with greater accuracy and an f1score of 0.61%compared with the rest of the rnn in addition to this experiment, we attempted to build a model using the random forest machine learning technique, which performed less efficiently in our scenario than the other techniques mentioned above. finally, we advise researchers in the li area to collect enough data for the entire perspective, increase number of features, and set aside time for training. as it can be seen in ## conclusion as shown in