stuff that I wrote
← All reports
NOV 25, 2026·1 MIN READ

Does sentiment analysis understand Taglish?

I ran three off-the-shelf sentiment models on 2,000 code-switched tweets. One of them did surprisingly well; the other two mostly guessed.

  • nlp
  • taglish
  • python

Why bother?

Most sentiment models are trained on monolingual English. But a huge chunk of Filipino social media is Taglish: English and Tagalog mixed mid-sentence.

So the question was simple: if you point a standard model at real Taglish text, does it still work, or does it fall apart?

✦ KEY FINDING

The multilingual model (XLM-R) hit 78% accuracy. The two English-only models landed around 52–55%, barely better than a coin flip.

Setup

  1. Collected 2,000 public tweets with at least one Tagalog and one English word
  2. Hand-labelled each as positive, negative, or neutral
  3. Ran three pretrained models with no fine-tuning
  4. Compared predictions against my labels
PYTHON
from transformers import pipeline

clf = pipeline("sentiment-analysis", model="cardiffnlp/twitter-xlm-roberta-base-sentiment")

clf("grabe ang ganda ng weather today, sobrang happy ko")
# [{'label': 'positive', 'score': 0.93}]
Confusion matrix for the three models
Where each model got confused

The English-only models had a clear failure mode: anything with Tagalog negation (hindi, wala) was usually read as neutral.

XLM-R handled negation much better, but still struggled with sarcasm, which, to be fair, so do people.

Code-switching isn't noise. It's how a lot of people actually talk.

— my notes, around 2am

What's next

Next up: fine-tuning on a small labelled Taglish set to see how far a few hundred examples can push things. Dataset notes are in data/README.md, and the original idea came from this paper.