Downloads · 30 days
13
15% of all-time downloads
HaniaEmaan/code-switching-codesaviours-si26-hania
code-switching-codesaviours-si26-hania is a token classification model from HaniaEmaan. Use it when you need labels on individual words, such as names. It is set up for transformers. The card lists the license as mit.
This model is a fine-tuned XLM-RoBERTa (base) architecture trained to perform word/token-level Language Identification on code-mixed social text containing Roman Urdu and English.
Downloads · 30 days
13
15% of all-time downloads
All-time downloads
85
Public
Parameters
277M
5.6 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors1.1 GB · 98%
From the Hugging Face model README
This model is a fine-tuned XLM-RoBERTa (base) architecture trained to perform word/token-level Language Identification on code-mixed social text containing Roman Urdu and English.
xlm-roberta-base| Label | Description | Example Words |
|---|---|---|
URD | Roman Urdu tokens | aaj, kal, kaam, hai |
ENG | English tokens | project, submission, file |
MIX | Hybrid code-mixed tokens | Hybrid words with local inflections |
The model was evaluated on a held-out test set using token-level precision, recall, and F1-scores via seqeval:
| Class / Label | Precision | Recall | F1-Score |
|---|---|---|---|
ENG | 0.99 | 0.99 | 0.99 |
URD | 0.91 | 0.89 | 0.90 |
MIX | 0.00 | 0.00 | 0.00 |
| Overall (Micro Avg) | 0.98 | 0.97 | 0.97 |
You can load and test this model directly using Hugging Face's pipeline:
from transformers import pipeline
nlp = pipeline(
"token-classification",
model="HaniaEmaan/code-switching-codesaviours-si26-hania",
aggregation_strategy="simple"
)
sentence = "aaj mera project submission complete ho gaya hai"
predictions = nlp(sentence)
for pred in predictions:
print(f"Token: {pred['word']} | Label: {pred['entity_group']} | Score: {pred['score']:.4f}")