Downloads · 30 days
9
4% of all-time downloads
akam-ot/kurdish-spellchecker-sorani-byt5
kurdish-spellchecker-sorani-byt5 is a text generation model from akam-ot. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
A ByT5-base sequence-to-sequence model fine-tuned for automatic Kurdish Sorani spellchecking.
Downloads · 30 days
9
4% of all-time downloads
All-time downloads
244
Public
Parameters
583M
2.3 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors2.3 GB · 100%
From the Hugging Face model README
A ByT5-base sequence-to-sequence model fine-tuned for automatic Kurdish Sorani spellchecking.
This model takes a potentially misspelled Kurdish Sorani sentence as input and outputs the corrected version. It operates at the byte level using Google's ByT5 architecture, making it robust to the character-level variations common in Kurdish text.
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
import torch
model_id = "akam-ot/kurdish-spellchecker-sorani-byt5"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForSeq2SeqLM.from_pretrained(model_id)
def spellcheck(text):
inputs = tokenizer(text, return_tensors="pt")
input_len = inputs["input_ids"].shape[1]
with torch.no_grad():
outputs = model.generate(
**inputs,
max_length=input_len + 20,
num_beams=4,
early_stopping=True,
)
return tokenizer.decode(outputs[0], skip_special_tokens=True)
print(spellcheck("كوردستان ولاتێكە"))
# → کوردستان وڵاتێکە
Akam GitHub · HuggingFace