Downloads · 30 days
8
19% of all-time downloads
Sumair-Parveiz/code-switching-codesaviours-si26-sumair
code-switching-codesaviours-si26-sumair is a token classification model from Sumair-Parveiz. Use it when you need labels on individual words, such as names. The card lists the license as apache-2.0.
This model is a fine-tuned version of XLM-RoBERTa (base) trained for token-level language identification in Roman Urdu and English text.
Downloads · 30 days
8
19% of all-time downloads
All-time downloads
43
Public
Parameters
277M
1.1 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 version of XLM-RoBERTa (base) trained for token-level language identification in Roman Urdu and English text.
0 / URD: Roman Urdu token1 / ENG: English token2 / MIX: Code-switched / Hybrid / Localized tokenEvaluated on test set tokens:
| Class | Precision | Recall | F1-Score |
|---|---|---|---|
| URD | 1.00 | 0.98 | 0.99 |
| ENG | 0.96 | 1.00 | 0.98 |
| MIX | 0.89 | 0.80 | 0.84 |
| Accuracy | — | — | 0.98 |
from transformers import AutoTokenizer, AutoModelForTokenClassification, pipeline
model_id = "Sumair-Parveiz/code-switching-codesaviours-si26-sumair"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForTokenClassification.from_pretrained(model_id)
nlp = pipeline("token-classification", model=model, tokenizer=tokenizer)
example = "Main abhi sochoing mode mein hoon"
print(nlp(example))