YAML Metadata Warning:empty or missing yaml metadata in repo card

Check out the documentation for more information.

Roman Urdu–English Code-Switching Language Identification

Model Description

This model is a fine-tuned version of xlm-roberta-base designed for token-level language identification in Roman Urdu–English code-switched text.

The model identifies whether individual words in a mixed-language sentence are written in Roman Urdu (URD) or English (ENG).

Example

Input:

Aaj mera mood bohot good hai

Expected language labels:

  • Aaj → URD
  • mera → URD
  • mood → ENG
  • bohot → URD
  • good → ENG
  • hai → URD

Project

This model was developed as part of the Code Saviours SI-26 internship programme.

Project: Code-Switching NLP
Task: Roman Urdu–English Token Classification
Base Model: XLM-RoBERTa (xlm-roberta-base)

Dataset

The dataset contains Roman Urdu–English code-switched sentences collected for this project.

  • Total word-level records: 1,593
  • Unique sentences: 157
  • Training sentences: 125
  • Testing sentences: 32
  • Labels: URD, ENG

The dataset does not contain MIX-labelled examples, so MIX was not included in the final evaluation.

Training

The model was fine-tuned using the Hugging Face Transformers library with GPU acceleration.

Training configuration:

  • Base model: XLM-RoBERTa
  • Number of labels: 2
  • Epochs: 5
  • Training batch size: 16
  • Task: Token classification

Evaluation Results

Metric Score
URD F1 92.91%
ENG F1 87.34%
Overall F1 91.13%
Accuracy 90.91%

Limitations

The dataset is relatively small and focuses specifically on Roman Urdu–English code-switching. Performance may vary on text containing different writing styles, spelling variations, slang, abbreviations, or languages outside the training data.

Intended Use

This model is intended for educational and research purposes, particularly for experimenting with language identification and code-switching in Roman Urdu–English text.

Acknowledgements

Developed as part of the Code Saviours SI-26 ML/AI Internship Programme.

Downloads last month
-
Safetensors
Model size
0.3B params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support