CoolFace
Modelpublic

Sumair-Parveiz/code-switching-codesaviours-si26-sumair

sourceHugging Faceapache-2.0updated 1mo agoView on Hugging Face
0likes11downloads
Model Card

Model for Code-Switched Roman Urdu & English

This model is a fine-tuned version of XLM-RoBERTa (base) trained for token-level language identification in Roman Urdu and English text.

Intended Use & Task

  • Task: Token Classification (Language Identification)
  • Labels:
  • 0 / URD: Roman Urdu token
  • 1 / ENG: English token
  • 2 / MIX: Code-switched / Hybrid / Localized token

Performance & Evaluation Metrics

Evaluated on test set tokens:

ClassPrecisionRecallF1-Score
URD1.000.980.99
ENG0.961.000.98
MIX0.890.800.84
Accuracy0.98

How to Use

python
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))