The first production-grade open-source NER model for Hinglish (Hindi-English code-mixed) text.
What is Hinglish?
Hinglish is Hindi-English code-mixed text — how 600M+ Indians actually write online.
"Virat ne Mumbai mein Zomato se biryani order ki aur 500 rupaye pay kiye."
→ Virat (PERSON), Mumbai (LOCATION), 500 rupaye (MONEY)
No standardised spelling. No existing NER dataset. This project fills that gap.
Model Performance
Entity
Precision
Recall
F1
DATE
1.000
1.000
1.000
ORG
0.786
0.688
0.733
LOCATION
0.667
0.444
0.533
PERSON
0.514
0.439
0.474
PRODUCT
0.000
0.000
0.000
MONEY
—
—
— (not in fresh test set)
Overall
0.614
0.479
0.538
Evaluated on a clean held-out test set (fresh sentences never seen during training).
Dev F1 during training: 74.10 (step 2,400, P=79.12, R=69.68)
Baseline (Gliner zero-shot, no fine-tuning): F1 = 59.8
Known limitations: PRODUCT generalises poorly (only 115 training examples). PERSON recall is low due to high spelling variation in Hinglish names.
Tech Stack
Tool
Role
spaCy 3.7+
NER training framework
XLM-RoBERTa
Multilingual encoder (pre-trained on 100 languages)
1curl -X POST http://localhost:8000/ner \2 -H "Content-Type: application/json"\3 -d '{"text": "Virat ne Mumbai mein Zomato se biryani order ki"}'
Response:
json
1{2"text":"Virat ne Mumbai mein Zomato se biryani order ki",3"entities":[4{"text":"Virat","label":"PERSON","start":0,"end":5},5{"text":"Mumbai","label":"LOCATION","start":9,"end":15}6]7}
POST /ner/batch — Multiple texts (max 100)
bash
1curl -X POST http://localhost:8000/ner/batch \2 -H "Content-Type: application/json"\3 -d '{"texts": ["Priya Delhi gayi.", "Shah Rukh Khan Netflix pe hai."]}'