You need to agree to share your contact information to access this dataset

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

Log in or Sign Up to review the conditions and access this dataset content.

YAML Metadata Warning:The task_categories "text2text-generation" is not in the official list: text-classification, token-classification, table-question-answering, question-answering, zero-shot-classification, translation, summarization, feature-extraction, text-generation, fill-mask, sentence-similarity, text-to-speech, text-to-audio, automatic-speech-recognition, audio-to-audio, audio-classification, audio-text-to-text, voice-activity-detection, depth-estimation, image-classification, object-detection, image-segmentation, text-to-image, image-to-text, image-to-image, image-to-video, unconditional-image-generation, video-classification, reinforcement-learning, robotics, tabular-classification, tabular-regression, tabular-to-text, table-to-text, multiple-choice, text-ranking, text-retrieval, time-series-forecasting, text-to-video, image-text-to-text, image-text-to-image, image-text-to-video, visual-question-answering, document-question-answering, zero-shot-image-classification, graph-ml, mask-generation, zero-shot-object-detection, text-to-3d, image-to-3d, image-feature-extraction, video-text-to-text, keypoint-detection, visual-document-retrieval, any-to-any, video-to-video, other

PersianPunc: A Large-Scale Dataset for Persian Punctuation Restoration

17 million samples · 6 source corpora · token-level sequence labeling
Accepted at the EACL 2026 SilkRoad NLP Workshop


Abstract

Punctuation restoration is essential for improving the readability and downstream utility of automatic speech recognition (ASR) outputs, yet remains underexplored for Persian despite its importance. We introduce PersianPunc, a large-scale, high-quality dataset of 17 million samples for Persian punctuation restoration, constructed through systematic aggregation and filtering of existing textual resources. We formulate punctuation restoration as a token-level sequence labeling task and fine-tune ParsBERT to achieve strong performance (macro F1: 91.33%). Through comparative evaluation, we demonstrate that while large language models can perform punctuation restoration, they suffer from critical limitations: over-correction tendencies and substantially higher computational requirements. The full dataset (17M samples), training subset, and fine-tuned model are publicly available.

📄 Paper: arXiv:2603.05314


Authors

Mohammad Javad Ranjbar Kalahroodi, Heshaam Faili, Azadeh Shakery

University of Tehran, Tehran, Iran Institute for Research in Fundamental Sciences (IPM), Tehran, Iran

📧 mohammadjranjbar@ut.ac.ir


Dataset Overview

PersianPunc addresses a critical gap in Persian NLP: the absence of a large-scale, publicly available corpus for punctuation restoration across diverse domains. The full dataset contains 17,102,014 unique samples spanning formal and informal Persian text. This repository provides a stratified ~823K sample subset suitable for model training and evaluation.

Split Samples
Train 812,123
Validation 10,000
Test 1,000
Total (this repo) 823,123

The complete 17M dataset is described in the paper. The subset here is stratified by source corpus to preserve domain proportions.


Task Definition

Punctuation restoration is formulated as token-level sequence labeling: given an unpunctuated Persian sentence, predict a punctuation label for each token position. Five classes are defined:

Label Symbol Description
EMPTY No punctuation
COMMA ، Persian comma
PERIOD . Full stop
QUESTION ؟ Persian question mark
COLON : Colon

Exclamation marks and semicolons are excluded as they are less frequent and often interchangeable with periods and commas in Persian.


Data Sources

The dataset aggregates six complementary Persian corpora spanning formal and informal registers:

Formal / Academic

  • BijankhanPeykare Corpus — literary and general Persian text with standardized punctuation
  • Persian Medical QA — bilingual medical question-answering in formal Persian
  • Persian Wikipedia — encyclopedic formal text

Contemporary / Informal

  • Persian Telegram Channels — social media text with varied punctuation usage
  • Farsi Stories — narrative fiction and short stories
  • Blog Dataset V2 — personal blogging and informal writing

Each source was manually inspected; at least 100 random samples per source were verified for correct punctuation usage before inclusion.


Dataset Features

Each sample contains two fields:

Field Type Description
sentence string A Persian sentence with punctuation intact (gold labels are derived from it)
source_dataset string Name of the originating corpus

Construction & Quality Control

Normalization: English punctuation marks are converted to Persian equivalents (e.g., ,،, ?؟). Non-Persian characters are removed; whitespace is normalized.

Filtering criteria (per sentence):

  • Minimum 10 characters
  • At least 2 punctuation marks from {., ،, !, ;, :}
  • Proper sentence termination (period, exclamation, or question mark)
  • No URLs, email addresses, @mentions, or emojis
  • No more than 20% non-alphabetic characters
  • No more than 30% non-Persian content
  • No repetitive punctuation patterns or fragmented text

Deduplication: SHA-256 hash-based exact deduplication with whitespace normalization, applied across all source corpora to prevent cross-source leakage.


Punctuation Distribution

Statistics from the complete 17M dataset:

Mark Count % of Total
Persian comma (،) 21,291,632 50.13%
Period (.) 15,076,946 35.50%
Colon (:) 4,228,554 9.96%
Exclamation (!) 1,209,227 2.85%
Persian question (؟) 665,841 1.57%

Average punctuation marks per sentence: 2.51. The period + Persian comma combination appears in 79.43% of sentences.


Model Performance

A fine-tuned ParsBERT model trained on the 1M-sample subset achieves:

Metric Score
Macro F1 91.33%
Micro F1 97.28%
Full Sentence Match (FSM) 61.80%

Per-class performance on the test set:

Punctuation Precision Recall F1
Persian Comma (،) 0.8408 0.7635 0.8003
Period (.) 0.9855 0.9886 0.9871
Question (؟) 0.8889 0.9032 0.8750
Colon (:) 0.9137 0.8955 0.9045
Macro Average 0.9038 0.8877 0.9202

Comparison with LLMs (zero-shot, same test set):

Model Macro F1 FSM Rate
GPT-4o-mini 79.54% 38.01%
GPT-4o 85.96% 50.10%
ParsBERT (ours) 91.33% 61.80%

The Full Sentence Match (FSM) rate reveals a key limitation of LLM-based approaches: GPT-4o makes undesired edits — word deletions and substitutions — in approximately 5% of samples. This over-correction behavior is particularly problematic for ASR post-processing pipelines where the source text must be preserved verbatim.


Usage

from datasets import load_dataset

dataset = load_dataset("MohammadJRanjbar/PersianPunc")

# Access splits
train = dataset["train"]
val   = dataset["validation"]
test  = dataset["test"]

# Example sample
print(train[0])
# {'sentence': '...', 'source_dataset': '...'}

To use this dataset for sequence labeling, strip punctuation from the sentence field to construct model inputs, then derive token-level labels from the original punctuation positions as targets.


Why Persian Punctuation Restoration?

Punctuation in Persian carries unusually high semantic weight. A single misplaced comma can invert the meaning of a sentence entirely:

Without punctuation: bakhshesh lazem nist e'damesh konid → "No mercy needed, execute him"

With comma: bakhshesh, lazem nist e'damesh konid → "Forgiveness, no need to execute him"

This makes punctuation restoration critical for ASR pipelines, sentiment analysis, machine translation, and any downstream NLP task operating on transcribed Persian speech.


Limitations

  • The filtering requirement of at least two punctuation marks per sentence excludes very simple sentences; the dataset is optimized for internal punctuation challenges (commas, colons, question marks) rather than sentence boundary detection.
  • The corpus reflects contemporary Persian writing styles and may not generalize to historical or highly specialized texts.
  • Source texts may contain occasional punctuation inconsistencies that could propagate to model training.

Citation

If you use PersianPunc in your research, please cite:

@misc{kalahroodi2026persianpunclargescaledatasetbertbased,
      title={PersianPunc: A Large-Scale Dataset and BERT-Based Approach for Persian Punctuation Restoration}, 
      author={Mohammad Javad Ranjbar Kalahroodi and Heshaam Faili and Azadeh Shakery},
      year={2026},
      eprint={2603.05314},
      archivePrefix={arXiv},
      primaryClass={cs.CL},
      url={https://arxiv.org/abs/2603.05314}
}

Keywords

punctuation restoration · Persian NLP · token classification · sequence labeling · ASR post-processing · ParsBERT · low-resource language · text normalization · Farsi

Downloads last month
7

Models trained or fine-tuned on MohammadJRanjbar/PersianPunc

Paper for MohammadJRanjbar/PersianPunc