oddadmix/egyptian-punctuation-restoration
668
Egyptian Punctuation Restoration

This model restores punctuation in Egyptian Arabic text. It can automatically insert periods, commas, question marks, and other punctuation marks in raw text that lacks any punctuation. This is particularly useful for processing informal text, chat logs, or transcribed speech in Egyptian Arabic.
Model Details
- Model name:
oddadmix/egyptian-punctuation-restoration - Language: Egyptian Arabic
- Task: Punctuation Restoration
- Framework: Transformers / Hugging Face
- Capabilities:
- Periods (
.) - Commas (
,) - Question marks (
؟) - Some handling of exclamation and conversational punctuation
Example
Input (without punctuation):
امبارح وانا راجع من الشغل قابلت واحد صاحبي قديم وهو ماشي قالي انت فاكر زمان لما كنا بنلعب كورة في الشارع والكرة وقعت في بلكونة الجيران وساعتها الراجل نزل زعقلنا هو كان شكله مخيف بس في نفس الوقت ضحك بطريقة غريبة وانا مش فاهم هو كان بيتريق علينا ولا فعلا كان مبسوط الغريبة ان بعد ما خلص كلامه فضل يسألني هو انت لسه بتلعب كورة لحد دلوقتي ولا بطلت وانا استغربت جدا ازاي بعد كل السنين دي لسه فاكر التفاصيل ديOutput (model punctuation restoration):
امبارح وانا راجع من الشغل قابلت واحد صاحبي قديم، وهو ماشي قالي: انت فاكر زمان لما كنا بنلعب كورة في الشارع والكرة وقعت في بلكونة الجيران؟ وساعتها الراجل نزل زعقلنا. هو كان شكله مخيف، بس في نفس الوقت ضحك بطريقة غريبة وانا مش فاهم هو كان بيتريق علينا ولا فعلا كان مبسوط. الغريبة ان بعد ما خلص كلامه، فضل يسألني: هو انت لسه بتلعب كورة لحد دلوقتي ولا بطلت؟ وانا استغربت جدا ازاي بعد كل السنين دي لسه فاكر التفاصيل دي.Notes:
- The model performs well on Egyptian Arabic text and informal conversational style.
- Best used for text longer than one sentence to achieve optimal punctuation restoration.
- Some cases of exclamations or quotations may not be perfectly restored.
Usage
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
tokenizer = AutoTokenizer.from_pretrained("oddadmix/egyptian-punctuation-restoration")
model = AutoModelForSeq2SeqLM.from_pretrained("oddadmix/egyptian-punctuation-restoration")
text = "امبارح وانا راجع من الشغل قابلت واحد صاحبي قديم وهو ماشي قالي انت فاكر زمان لما كنا بنلعب كورة في الشارع والكرة وقعت في بلكونة الجيران"
inputs = tokenizer(text, return_tensors="pt")
outputs = model.generate(**inputs)
restored_text = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(restored_text)Citation
If you use this model, please cite it as:
@misc{oddadmix2025egyptianpunctuation,
title={Egyptian Punctuation Restoration Model},
author={Oddadmix},
year={2025},
url={https://huggingface.co/oddadmix/egyptian-punctuation-restoration}
}License: MIT
