|
--- |
|
dataset_info: |
|
features: |
|
- name: tokens |
|
sequence: string |
|
- name: ner_tags |
|
sequence: string |
|
- name: ner_tags_index |
|
sequence: int64 |
|
splits: |
|
- name: train |
|
num_bytes: 177058008 |
|
num_examples: 446243 |
|
- name: validation |
|
num_bytes: 22025192 |
|
num_examples: 55780 |
|
- name: test |
|
num_bytes: 22202539 |
|
num_examples: 55781 |
|
download_size: 46003884 |
|
dataset_size: 221285739 |
|
configs: |
|
- config_name: default |
|
data_files: |
|
- split: train |
|
path: data/train-* |
|
- split: validation |
|
path: data/validation-* |
|
- split: test |
|
path: data/test-* |
|
license: apache-2.0 |
|
task_categories: |
|
- token-classification |
|
language: |
|
- fa |
|
tags: |
|
- persian |
|
- farsi |
|
- ner |
|
- name entity recognition |
|
- persian ner |
|
size_categories: |
|
- 100K<n<1M |
|
--- |
|
|
|
# Persian-NER-Dataset-500k |
|
|
|
This repository contains a comprehensive Persian Named Entity Recognition (NER) dataset with approximately 500,000 tokens. This dataset is a collection of all available Persian NER datasets, carefully cleaned and consolidated to ensure the highest quality for training, validating, and testing NER models in the Persian language. The dataset is divided into three subsets: training, validation, and test. |
|
|
|
## Updating... |
|
|
|
## Dataset Overview |
|
|
|
The dataset is structured as follows: |
|
|
|
- **Training Set:** |
|
- Number of rows: 446,243 |
|
- Features: `ner_tags`, `tokens`, `ner_tags_index` |
|
|
|
- **Validation Set:** |
|
- Number of rows: 55,780 |
|
- Features: `ner_tags`, `tokens`, `ner_tags_index` |
|
|
|
- **Test Set:** |
|
- Number of rows: 55,781 |
|
- Features: `ner_tags`, `tokens`, `ner_tags_index` |
|
|
|
### Features |
|
|
|
- `ner_tags`: The Named Entity Recognition tags associated with each token. |
|
- `tokens`: The tokens (words) that have been tagged. |
|
- `ner_tags_index`: The index values corresponding to the NER tags, which map to specific named entities. |
|
|
|
### NER Tags |
|
|
|
The dataset includes the following NER tags: |
|
|
|
- **EVENT**: Events, including historically significant events or recurring cultural phenomena, etc. |
|
- **NORP**: Nationalities, religious or political groups, etc. |
|
- **TIME**: Times less specific than dates, including years, seasons, and general times of day, etc. |
|
- **MONEY**: Monetary values, including unit, etc. |
|
- **DATE**: Absolute or relative dates or periods, etc. |
|
- **MED**: Medicines, including drugs and their categories, etc. |
|
- **WORK_OF_ART**: Titles of books, songs, and other creative works, etc. |
|
- **PERCENT**: Percentage expressions, etc. |
|
- **FAC**: Buildings, airports, highways, bridges, and other facilities, etc. |
|
- **LANGUAGE**: Any named language, etc. |
|
- **ORG**: Organizations, including companies, institutions, government bodies, etc. |
|
- **PERSON**: People, including fictional, etc. |
|
- **GPE**: Countries, cities, states, etc. |
|
- **LAW**: Named documents made into laws, etc. |
|
- **QUANTITY**: Measurements that are not monetary or percentages, etc. |
|
- **MISC**: Miscellaneous entities, catch-all for entities that do not fit in the above categories, etc. |
|
- **DISEASE**: Names of diseases and medical conditions, etc. |
|
- **PRODUCT**: Objects, vehicles, foods, etc., that are products or commodities, etc. |
|
- **ORDINAL**: "First", "second", etc. |
|
- **CARDINAL**: Cardinal numbers, etc. |
|
|
|
### Tag Counts |
|
|
|
Below is a table summarizing the counts of each NER tag across the training, validation, and test datasets: |
|
|
|
| NER Tag | Train | Validation | Test | |
|
|----------------|--------|------------|--------| |
|
| B-ORG | 74,751 | 9,177 | 9,397 | |
|
| I-ORG | 93,323 | 11,065 | 11,581 | |
|
| B-PRODUCT | 35,624 | 4,515 | 4,441 | |
|
| I-PRODUCT | 31,539 | 3,995 | 3,975 | |
|
| B-PERSON | 160,596| 19,785 | 19,932 | |
|
| I-PERSON | 161,614| 19,912 | 20,195 | |
|
| B-NORP | 44,956 | 5,445 | 5,751 | |
|
| I-NORP | 58,288 | 6,986 | 7,502 | |
|
| B-GPE | 133,887| 16,638 | 16,517 | |
|
| I-GPE | 73,628 | 8,993 | 8,987 | |
|
| B-WORK_OF_ART | 65,521 | 8,268 | 8,134 | |
|
| I-WORK_OF_ART | 84,308 | 10,770 | 10,461 | |
|
| B-CARDINAL | 6,560 | 880 | 875 | |
|
| I-CARDINAL | 2,059 | 243 | 258 | |
|
| I-GPE | 73,628 | 8,993 | 8,987 | |
|
| B-MED | 9,347 | 1,173 | 1,177 | |
|
| B-EVENT | 1,885 | 233 | 231 | |
|
| I-EVENT | 4,422 | 579 | 532 | |
|
| B-FAC | 10,167 | 1,305 | 1,261 | |
|
| I-FAC | 12,465 | 1,599 | 1,501 | |
|
| B-DATE | 11,712 | 1,407 | 1,451 | |
|
| I-DATE | 12,323 | 1,537 | 1,544 | |
|
| B-QUANTITY | 632 | 79 | 78 | |
|
| I-QUANTITY | 1,162 | 155 | 146 | |
|
| B-MONEY | 2,514 | 325 | 331 | |
|
| I-MONEY | 5,383 | 738 | 726 | |
|
| B-TIME | 1,468 | 179 | 200 | |
|
| I-TIME | 1,844 | 234 | 266 | |
|
| B-DISEASE | 8,524 | 1,072 | 1,021 | |
|
| B-ORDINAL | 1,486 | 181 | 182 | |
|
| I-DISEASE | 8,783 | 1,135 | 1,086 | |
|
| B-LAW | 241 | 46 | 50 | |
|
| I-MED | 4,457 | 605 | 600 | |
|
| B-MISC | 3,477 | 474 | 435 | |
|
| I-LAW | 498 | 103 | 131 | |
|
| B-PERCENT | 1,895 | 249 | 190 | |
|
| I-PERCENT | 2,340 | 313 | 243 | |
|
| I-MISC | 1,819 | 238 | 210 | |
|
| B-LANGUAGE | 280 | 38 | 25 | |
|
| I-ORDINAL | 19 | 6 | 3 | |
|
| I-LANGUAGE | 19 | 4 | 6 | |
|
|
|
## Usage |
|
|
|
This dataset can be used to train, validate, and test NER models in the Persian language. The structured format of the dataset allows easy integration into various deep learning frameworks like TensorFlow, PyTorch, or Hugging Face's `transformers`. |
|
|
|
### Example Code |
|
|
|
Here's an example of how you might load and use this dataset in Python using the `datasets` library: |
|
|
|
```python |
|
from datasets import load_dataset |
|
|
|
# Load the dataset |
|
dataset = load_dataset("mansoorhamidzadeh/Persian-NER-Dataset-500k") |
|
|
|
# Access the train, validation, and test sets |
|
train_dataset = dataset['train'] |
|
validation_dataset = dataset['validation'] |
|
test_dataset = dataset['test'] |
|
|
|
# Example: Accessing the first example from the train set |
|
print(train_dataset[0]) |
|
``` |
|
|
|
```bibtext |
|
@dataset{hamidzadeh2024persian_ner_500k, |
|
author = {Mansoor Hamidzadeh}, |
|
title = {Persian-NER-Dataset-500k}, |
|
year = 2024, |
|
url = {https://huggingface.co./datasets/mansoorhamidzadeh/Persian-NER-Dataset-500k} |
|
} |
|
``` |