← Latest papers
💬 NLP

Detection of Emotions in Hindi-English Code Mixed Text Data

This paper introduces a new annotated corpus of Hindi-English code-mixed text and proposes a consonant-constrained normalization method to improve emotion detection, demonstrating that a sub-word LSTM model achieves the highest accuracy (76.6%) among five compared baselines for classifying anger, fear, happiness, and sadness.

Original authors: Divyansh Singh

Published 2026-08-10
📖 4 min read☕ Coffee break read

Original authors: Divyansh Singh

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine the internet as a giant, bustling global marketplace where people from different countries are shouting their thoughts, jokes, and feelings into the digital air. In India, a huge part of this chatter happens in a unique, hybrid language called "Hinglish." It's like a linguistic smoothie where Hindi and English get blended together in a single sentence. The problem is that because everyone types this on their phones using the Latin alphabet (the same letters we use for English), there are no strict rules for how to spell the Hindi words. One person might write "love" as pyaar, another as pyar, and a third as pyr. To a computer, these look like three completely different words, making it very hard for software to understand what people are actually saying.

This is where the science of "Natural Language Processing" (NLP) comes in. Think of NLP as teaching computers to read and understand human language. While computers have gotten pretty good at figuring out if a sentence is generally "happy" or "sad" (sentiment analysis), they struggle to detect specific, complex feelings like anger, fear, or excitement, especially when the text is messy and mixed-up. Understanding these specific emotions is crucial because it helps computers know if someone is just having a bad day or if they are in real danger, which is vital for things like online safety and mental health monitoring.

Enter a researcher from the LNMIIT in Jaipur, India, who decided to tackle this messy, mixed-language puzzle. They wanted to teach computers to spot four specific emotions—Anger, Fear, Sadness, and Happiness—in Hinglish text. To do this, they first had to build their own "dictionary" of feelings. They collected 1,589 sentences from Twitter and video comment sections, where people were chatting freely. Two native speakers of Hindi (who also speak English fluently) read every sentence and labeled the emotion. They agreed on the labels almost perfectly, creating a high-quality training set for their computer models.

The researcher faced a tricky obstacle: the spelling chaos. Since people spell Hindi words in so many different ways, the computer kept getting confused. To fix this, the researcher invented a clever "normalization" trick. Imagine you have a pile of socks where some are labeled "Red," some "Redd," and some "Rd." Instead of trying to guess which is right, the computer looks at the "skeleton" of the word (the consonants) and how often the word appears in similar contexts. It then groups all the weird spellings together and replaces them with the most common version. This cleans up the data so the computer isn't distracted by spelling errors.

Next, they tested five different computer "brains" (algorithms) to see which one could best guess the emotion. They compared simple statistical methods against more complex neural networks. The big surprise? The most complex model, which looked at the tiny building blocks of words (sub-words) rather than whole words, won the race. It achieved an accuracy of 76.6%, which is a huge jump from the 30.8% you'd get if you just guessed the most common emotion every time. This suggests that breaking words down into smaller pieces helps the computer handle the messy spelling variations much better.

However, the researcher was careful not to declare a total victory. They found that a simpler, older method called "Naïve Bayes" (which basically counts how often certain words appear) performed almost as well as the fancy neural network. This suggests that in short social media posts, emotions are often carried by just one or two key words, so a simple word-counter can do a surprisingly good job. The paper concludes that while the sub-word model is the current champion, the small size of their dataset (1,589 sentences) makes it hard to say for sure if one method is truly superior to the other. They suggest that the biggest hurdle isn't the algorithm, but the lack of data; with a much larger library of examples, these computers could likely become even sharper at reading our digital hearts.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →