mahwizzzz / urdu_text_correction

huggingface.co
Total runs: 40
24-hour runs: 0
7-day runs: 23
30-day runs: 23
Model's Last Updated: March 21 2025
text-generation

Introduction of urdu_text_correction

Model Details of urdu_text_correction

Urdu Text Correction Model

This model fine-tunes facebook/mbart-large-50 for automatic correction of Urdu text, addressing spelling mistakes, grammatical errors, and improving text fluency.

License: MIT Model: mBART-large-50

Overview

The Urdu Text Correction model is designed to automatically detect and correct errors in Urdu text, making it valuable for content editors, publishers, educational institutions, and applications requiring high-quality Urdu text.

Performance Metrics

The model achieves the following results on our evaluation set:

Metric Score
BLEU 0.6996
METEOR 0.8296
WER (Word Error Rate) 0.1795
CER (Character Error Rate) 0.0761
ROUGE-1 0.2025
ROUGE-2 0.0699
ROUGE-L 0.2023
Exact Match 0.1096
Generation Length 28.4033
Loss 0.4305
Usage
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM

# Load model and tokenizer
tokenizer = AutoTokenizer.from_pretrained("mahwizzzz/urdu_text_correction")
model = AutoModelForSeq2SeqLM.from_pretrained("mahwizzzz/urdu_text_correction")

# Example text with errors
incorrect_text = "یہہ ایک اچھی بات ہے"

# Tokenize and generate correction
inputs = tokenizer(incorrect_text, return_tensors="pt", max_length=128, truncation=True)
outputs = model.generate(**inputs, max_length=128)
corrected_text = tokenizer.decode(outputs[0], skip_special_tokens=True)

print(f"Original: {incorrect_text}")
print(f"Corrected: {corrected_text}")

Model Description

This is an encoder-decoder model based on mBART-large-50, specifically fine-tuned on Urdu text correction pairs. The model learns to transform incorrect Urdu text into its corrected form, addressing issues such as:

  • Spelling mistakes
  • Grammar errors
  • Word order issues
  • Missing diacritics
  • Punctuation errors

Training Details

Data

The model was trained on a dataset of incorrect-correct Urdu text pairs.

Hyperparameters

The model was trained with the following hyperparameters:

  • Learning rate: 3e-05
  • Batch size: 128 (32 per device with gradient accumulation of 4)
  • Optimizer: AdamW with betas=(0.9, 0.999)
  • LR scheduler: Cosine with 500 warmup steps
  • Training epochs: 3
  • Mixed precision: Native AMP

Limitations

The model may not perform well on highly domain-specific text (technical, medical, etc.) Very long texts may need to be split into smaller chunks due to the model's maximum sequence length The model may sometimes over-correct dialectal variations or stylistic choices Performance is dependent on the quality and diversity of the training data

Future Work

Expanding the training dataset with more diverse text sources Domain adaptation for specific use cases (legal, medical, etc.) Performance optimization for faster inference Improved handling of complex grammatical structures

Citation

If you use this model in your research or project, please cite:

@model{urdu_text_correction,
  title = {Urdu Text Correction Model}
  author = {Mahwiz Khalil},
  year = {2025},
  publisher = {HuggingFace},
  howpublished = {\url{https://huggingface.co/mahwizzzz/urdu_text_correction}}
}

Runs of mahwizzzz urdu_text_correction on huggingface.co

40
Total runs
0
24-hour runs
-2
3-day runs
23
7-day runs
23
30-day runs

More Information About urdu_text_correction huggingface.co Model

More urdu_text_correction license Visit here:

https://choosealicense.com/licenses/mit

urdu_text_correction huggingface.co

urdu_text_correction huggingface.co is an AI model on huggingface.co that provides urdu_text_correction's model effect (), which can be used instantly with this mahwizzzz urdu_text_correction model. huggingface.co supports a free trial of the urdu_text_correction model, and also provides paid use of the urdu_text_correction. Support call urdu_text_correction model through api, including Node.js, Python, http.

urdu_text_correction huggingface.co Url

https://huggingface.co/mahwizzzz/urdu_text_correction

mahwizzzz urdu_text_correction online free

urdu_text_correction huggingface.co is an online trial and call api platform, which integrates urdu_text_correction's modeling effects, including api services, and provides a free online trial of urdu_text_correction, you can try urdu_text_correction online for free by clicking the link below.

mahwizzzz urdu_text_correction online free url in huggingface.co:

https://huggingface.co/mahwizzzz/urdu_text_correction

urdu_text_correction install

urdu_text_correction is an open source model from GitHub that offers a free installation service, and any user can find urdu_text_correction on GitHub to install. At the same time, huggingface.co provides the effect of urdu_text_correction install, users can directly use urdu_text_correction installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

urdu_text_correction install url in huggingface.co:

https://huggingface.co/mahwizzzz/urdu_text_correction

Url of urdu_text_correction

urdu_text_correction huggingface.co Url

Provider of urdu_text_correction huggingface.co

mahwizzzz
ORGANIZATIONS

Other API from mahwizzzz

huggingface.co

Total runs: 345
Run Growth: 345
Growth Rate: 100.00%
Updated:December 26 2025
huggingface.co

Total runs: 87
Run Growth: 85
Growth Rate: 100.00%
Updated:September 10 2026
huggingface.co

Total runs: 27
Run Growth: 16
Growth Rate: 57.14%
Updated:May 24 2026
huggingface.co

Total runs: 25
Run Growth: 1
Growth Rate: 4.00%
Updated:March 03 2025
huggingface.co

Total runs: 24
Run Growth: 7
Growth Rate: 29.17%
Updated:February 19 2026
huggingface.co

Total runs: 18
Run Growth: 0
Growth Rate: 0.00%
Updated:July 11 2025
huggingface.co

Total runs: 14
Run Growth: -10
Growth Rate: -71.43%
Updated:July 19 2025
huggingface.co

Total runs: 13
Run Growth: 11
Growth Rate: 84.62%
Updated:November 27 2023
huggingface.co

Total runs: 5
Run Growth: 2
Growth Rate: 40.00%
Updated:May 29 2026
huggingface.co

Total runs: 4
Run Growth: 3
Growth Rate: 75.00%
Updated:November 04 2025
huggingface.co

Total runs: 4
Run Growth: 0
Growth Rate: 0.00%
Updated:May 28 2025
huggingface.co

Total runs: 4
Run Growth: 2
Growth Rate: 50.00%
Updated:August 21 2023
huggingface.co

Total runs: 3
Run Growth: 0
Growth Rate: 0.00%
Updated:April 23 2025
huggingface.co

Total runs: 3
Run Growth: 2
Growth Rate: 66.67%
Updated:June 25 2025
huggingface.co

Total runs: 2
Run Growth: 2
Growth Rate: 100.00%
Updated:January 02 2025
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:November 04 2025
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:August 07 2025
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:September 18 2023
huggingface.co

Total runs: 0
Run Growth: -2
Growth Rate: 0.00%
Updated:April 06 2025
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:October 24 2023