Introduction
In multilingual societies, language choice is rarely arbitrary. Speakers often switch between languages—a phenomenon known as code-switching—to convey specific emotional nuances or "flavors." While previous sociolinguistic research suggested that bilinguals prefer their native language (L1) for emotional expression, these studies were typically limited to small-scale interviews or speech transcripts.
This paper provides the first large-scale quantitative evidence that Hindi-English bilinguals on Twitter exhibit a distinct "language of the heart." By analyzing over 430,000 tweets, the researchers demonstrate that these users overwhelmingly prefer Hindi for expressing negative sentiments and swearing, while often utilizing English (L2) for more neutral or positive discourse. This suggests that code-switching serves specific pragmatic functions, such as signaling shifts in emotional polarity.
Methodology and Pipeline
To scale sociolinguistic observations to the digital age, the researchers developed a multi-stage computational pipeline designed to process massive amounts of "Hinglish" (code-switched) data.
The system architecture, as illustrated in the figure above, involves several key steps:
- Language Identification: Tweets are categorized into four types: Devanagari Hindi ($hd$), Romanized English ($er$), Romanized Hindi ($hr$), and Mixed/Code-switched ($mr$). A Maximum Entropy model using character n-gram features was employed for Romanized text.
- Opinion Detection: A two-step SVM classifier (with an RBF kernel) determines if a tweet is "opinionated" or "factual/non-opinionated."
- Sentiment Analysis: Opinionated tweets are further classified as positive, negative, or neutral.
- Feature Engineering: The models utilize "event-independent" features such as elongated words (e.g., "sooo"), intensifiers, modal verbs, and specialized lexicons for swear words.
Datasets
The study utilized several corpora:
- $T_{All}$: A primary corpus of 430,000 unique India-specific tweets across sports, movies, politics, and current events.
- $T_{BL}$: A subset of 240,000 tweets from confirmed bilingual users.
- SAC (Sentiment & Analysis Corpus): 1,260 manually annotated tweets for training and evaluation.
Key Insights: The Pragmatics of Code-Switching
Hindi for Negative Sentiment
The data strongly supports the "L1 for emotion" hypothesis, specifically for negative affect. In the "Politics" domain, the odds of expressing a negative opinion in Hindi were nearly 10 times higher than in English. Furthermore, over 90% of swear words in code-switched tweets occurred within Hindi fragments, even when the surrounding context was English.
The Polarity Switch
In code-switched ($mr$) tweets, a transition from English to Hindi serves as a powerful signal of shifting sentiment. The researchers found a "polarity switch" ratio of 10.27, indicating that users are over ten times more likely to switch to Hindi when moving from a positive/neutral statement to a negative one than the reverse.
Script and Formality
Tweets written in the Devanagari script ($hd$) tended to be more factual and less opinionated, often originating from official sources like news outlets or celebrities. In contrast, Romanized Hindi ($hr$) is the primary domain for general users expressing raw, personal opinions.
Quantitative Results
The performance of the automated classifiers was evaluated across the different language categories. While sentiment detection in code-switched text remains a challenging NLP task, the models achieved sufficient accuracy to extract robust statistical trends.
As shown in the table above, opinion detectors achieved accuracies between 72% and 79.9%, while sentiment classifiers ranged from 61.5% to 64.4%. Despite English dominating the overall corpus (~79%), the preference for Hindi in negative contexts remained consistent across all analyzed topics for bilingual users.
Conclusion and Future Directions
This research quantifies the "Narrative-Evaluative" function of code-switching, showing that users switch languages when moving from factual description to personal evaluation in 46.1% of code-switched tweets. While the automated tools have inherent error rates, the descriptive statistics provide a clear picture of bilingual behavior on social media.
Future work may investigate whether English is preferred for positive expression due to its status as a "language of aspiration" in India, or if the "L1 for negativity" trend is a universal linguistic trait observable in other language pairs like Spanish-English or Turkish-German.
Summary updated