Exploring Sentiment Analysis for Spanglish: Why Sociolinguistic Context Still Matters for NLP
<span style="font-weight: 400;">This thesis explores the role of sociolinguistic context in natural language processing (NLP), with a specific focus on sentiment analysis of Spanish-English code-switched language. Despite recent advancements in large language models (LLMs), mixed-code text remains a challenge for NLP systems, often yielding significantly lower performance compared to monolingual tasks. To investigate this gap, I evaluate the performance of both small and large multilingual language models on benchmark sentiment analysis tasks using three mixed-code datasets: LinCE, the Bangor Miami corpus, and EN-ES-CS </span><span style="font-weight: 400;">(Aguilar et al., 2020; Deuchar, 2010; Vilares et al., 2016)</span><span style="font-weight: 400;">. I further examine whether structural measures of code-switching (CS) can serve as reliable predictors of sentiment. Finally, I conduct a time-series analysis to explore whether emotional content tends to lead or lag behind code-switch events. My results show that while the utterance-level switching metric </span><span style="font-weight: 400;">(Gambäck & Das, 2016)</span><span style="font-weight: 400;"> is statistically associated with sentiment class, it has limited predictive value in practice, and augmenting models with this feature does not yield meaningful performance gains. Similarly, my results suggest a statistically significant leading relationship between emotionality and CS time series, though the effect size is small. These findings suggest that syntactic or frequency-based features alone are insufficient for modeling sentiment in mixed-code contexts, and that future NLP systems may benefit from integrating deeper sociolinguistic insights.</span>
Institutions
- University of North Carolina at Chapel Hill (US)
Publication Details
- Journal
- UNC Libraries
- Published
- 2025-06-17
- DOI
- https://doi.org/10.17615/f35g-wy78
- Primary Topic
- Sentiment Analysis and Opinion Mining
- Type
- article
- Field-Weighted Citation Impact
- 0.00
Funders
- University of North Carolina at Chapel Hill