Language Identification and Named Entity Recognition in Hinglish Code Mixed Tweets

Kushagra Singh, Indira Sen, Ponnurangam KumaraguruACL 2018

Abstract

Social media platforms have seen a surge in code-mixed content, where users switch between languages within a single post. Hinglish, a blend of Hindi and English written in Roman script, is particularly prevalent among Indian Twitter users. This paper presents a specialized pipeline for Language Identification (LID) and Named Entity Recognition (NER) in Hinglish tweets, demonstrating significant improvements over standard monolingual tools.

Introduction

Traditional Natural Language Processing (NLP) systems are typically designed for monolingual text. However, the linguistic reality of social media is often "code-mixed." In India, with over 240 million active Twitter users, Hinglish is a dominant mode of communication. Standard NER tools often fail on such data, treating foreign words as noise or out-of-vocabulary tokens. This work addresses the gap by developing a robust system for identifying languages and extracting entities from code-mixed tweets.

Methodology

The proposed system follows a two-stage architecture: Language Identification followed by Named Entity Recognition.

Language Identification (LID)

The LID system employs a "transliteration-plus-classification" strategy. Since Hindi in tweets is usually Romanized, a Seq2Seq model with Attention is used to transliterate tokens into Devanagari. Features are then extracted using two character-level LSTM Recurrent Neural Networks: an English Language Model (ELM) and a Hindi Language Model (HLM), trained on large monolingual corpora. These features, along with capitalization and character ratios, are fed into a neural network classifier to tag tokens as English, Hindi, or "Rest."

LID Pipeline Architecture

Named Entity Recognition (NER)

Using the language tags as a primary feature, the authors implemented NER using Conditional Random Fields (CRF) and Bi-LSTMs. Additional features include word shapes, character-level affixes (prefixes/suffixes of length 1-5), and syntactic features like Part-of-Speech (POS) and chunk tags.

Experimental Setup

The models were evaluated on a newly curated dataset of 2,079 Hinglish tweets, annotated for Person (PER), Location (LOC), and Organization (ORG) entities. The LID system was trained using the News Crawl dataset for English and the IIT Bombay Hindi corpus for language modeling.

Results and Discussion

The LID system achieved a high average F1 score of 0.934. For the NER task, the CRF-based model significantly outperformed deep learning approaches and established baselines.

NER Performance Comparison

As shown in the table above, the CRF model achieved an overall F1 score of 72.06%. In contrast, state-of-the-art monolingual models like Lample et al. and Ritter et al. performed poorly on the Hinglish data, with F1 scores of 33.77% and 36.88% respectively. This represents a performance gain of over 35 percentage points, highlighting the necessity of language-aware features in code-mixed environments.

Conclusion

This research demonstrates that specialized architectures incorporating transliteration and language modeling are essential for processing code-mixed social media text. While the current study focuses on Hinglish in Roman script, the results suggest that language awareness is mandatory for effective information extraction in multilingual regions. Future work aims to scale the dataset and extend the methodology to other Indian languages and downstream NLP tasks like sentiment analysis.

Summary updated

BibTeX
@inproceedings{singh2018language,
  author = {Kushagra Singh and Indira Sen and Ponnurangam Kumaraguru},
  title = {{Language Identification and Named Entity Recognition in Hinglish Code Mixed Tweets}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2018},
  doi = {10.18653/v1/p18-3008},
}
Figure