BDanial's picture
Update README.md
4e0631b verified
|
Raw
History Blame Contribute Delete
2.41 kB
---
license: cc-by-nc-4.0
language:
- fa
- prs
- pus
- ku
- glk
tags:
- persian
- dialects
- pretraining
- low-resource
- text-generation
- aparsin
pretty_name: APARSIN Low-Resource Persian Dialects
size_categories:
- 100K<n<1M
---
# APARSIN Low-Resource Persian Dialects Pretraining Corpus
## Dataset Description
This dataset is a comprehensive pretraining corpus specifically curated for extremely low-resource Persian dialects and related regional languages. Created by the [APARSIN (SilkRoadAparsin)](https://huggingface.co/APARSIN) organization, it aggregates, normalizes, and categorizes text from various sparse sources to facilitate the pretraining of Large Language Models (LLMs) on underrepresented languages and dialects.
Languages and dialects covered include (but are not limited to):
* Hazaragi
* Dari
* Gilaki
* Pashto
* Kurdish (Central/Sorani, Northern/Kurmanji, Southern)
* Standard Persian (for alignment and comparative purposes)
## Dataset Structure
### Data Fields
Each record in the dataset is structured to prevent schema conflicts while retaining all source metadata. The fields are:
- `text` *(string)*: The raw textual content.
- `source` *(string)*: The origin or source dataset of the text (e.g., Hezarai, Arman, Parsinlu, DOLMA, PEYMA, BBC).
- `language` *(string)*: The specific language or dialect code (e.g., `fa`, `glk`, `prs`, `ckb`).
- `extra` *(string)*: A JSON-serialized string containing additional source-specific metadata (like `split`, `original_file`, etc.).
### Dataset Statistics
##### Language Distribution
![Language Statistics](assets/language_statistics_plot.png)
##### Tokens Per Language
![Tokens Per Language](assets/tokens_per_language.png)
## Usage
You can load this dataset using the Hugging Face `datasets` library. Because the `extra` field is serialized to ensure schema compatibility, you can parse it back into a dictionary using the `json` module.
```python
from datasets import load_dataset
import json
# Replace with the exact repository ID where you uploaded the dataset
repo_id = "APARSIN/persian-dialects-pretraining"
dataset = load_dataset(repo_id, split="train")
# Example of reading the serialized metadata
sample = dataset[0]
extra_metadata = json.loads(sample["extra"])
print(f"Dialect: {sample['language']}")
print(f"Source: {sample['source']}")
print(f"Metadata: {extra_metadata}")
print(f"Text: {sample['text'][:100]}...")