mansoorhamidzadeh commited on
Commit
b6d75d0
1 Parent(s): dc5cbf0

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +146 -0
README.md CHANGED
@@ -28,4 +28,150 @@ configs:
28
  path: data/validation-*
29
  - split: test
30
  path: data/test-*
 
 
 
 
 
 
 
 
 
 
 
 
 
31
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
28
  path: data/validation-*
29
  - split: test
30
  path: data/test-*
31
+ license: apache-2.0
32
+ task_categories:
33
+ - token-classification
34
+ language:
35
+ - fa
36
+ tags:
37
+ - persian
38
+ - farsi
39
+ - ner
40
+ - name entity recognition
41
+ - persian ner
42
+ size_categories:
43
+ - 100K<n<1M
44
  ---
45
+
46
+ # Persian-NER-Dataset-500k
47
+
48
+ 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.
49
+
50
+ ## Updating...
51
+
52
+ ## Dataset Overview
53
+
54
+ The dataset is structured as follows:
55
+
56
+ - **Training Set:**
57
+ - Number of rows: 446,243
58
+ - Features: `ner_tags`, `tokens`, `ner_tags_index`
59
+
60
+ - **Validation Set:**
61
+ - Number of rows: 55,780
62
+ - Features: `ner_tags`, `tokens`, `ner_tags_index`
63
+
64
+ - **Test Set:**
65
+ - Number of rows: 55,781
66
+ - Features: `ner_tags`, `tokens`, `ner_tags_index`
67
+
68
+ ### Features
69
+
70
+ - `ner_tags`: The Named Entity Recognition tags associated with each token.
71
+ - `tokens`: The tokens (words) that have been tagged.
72
+ - `ner_tags_index`: The index values corresponding to the NER tags, which map to specific named entities.
73
+
74
+ ### NER Tags
75
+
76
+ The dataset includes the following NER tags:
77
+
78
+ - **EVENT**: Events, including historically significant events or recurring cultural phenomena, etc.
79
+ - **NORP**: Nationalities, religious or political groups, etc.
80
+ - **TIME**: Times less specific than dates, including years, seasons, and general times of day, etc.
81
+ - **MONEY**: Monetary values, including unit, etc.
82
+ - **DATE**: Absolute or relative dates or periods, etc.
83
+ - **MED**: Medicines, including drugs and their categories, etc.
84
+ - **WORK_OF_ART**: Titles of books, songs, and other creative works, etc.
85
+ - **PERCENT**: Percentage expressions, etc.
86
+ - **FAC**: Buildings, airports, highways, bridges, and other facilities, etc.
87
+ - **LANGUAGE**: Any named language, etc.
88
+ - **ORG**: Organizations, including companies, institutions, government bodies, etc.
89
+ - **PERSON**: People, including fictional, etc.
90
+ - **GPE**: Countries, cities, states, etc.
91
+ - **LAW**: Named documents made into laws, etc.
92
+ - **QUANTITY**: Measurements that are not monetary or percentages, etc.
93
+ - **MISC**: Miscellaneous entities, catch-all for entities that do not fit in the above categories, etc.
94
+ - **DISEASE**: Names of diseases and medical conditions, etc.
95
+ - **PRODUCT**: Objects, vehicles, foods, etc., that are products or commodities, etc.
96
+ - **ORDINAL**: "First", "second", etc.
97
+ - **CARDINAL**: Cardinal numbers, etc.
98
+
99
+ ### Tag Counts
100
+
101
+ Below is a table summarizing the counts of each NER tag across the training, validation, and test datasets:
102
+
103
+ | NER Tag | Train | Validation | Test |
104
+ |----------------|--------|------------|--------|
105
+ | B-ORG | 74,751 | 9,177 | 9,397 |
106
+ | I-ORG | 93,323 | 11,065 | 11,581 |
107
+ | B-PRODUCT | 35,624 | 4,515 | 4,441 |
108
+ | I-PRODUCT | 31,539 | 3,995 | 3,975 |
109
+ | B-PERSON | 160,596| 19,785 | 19,932 |
110
+ | I-PERSON | 161,614| 19,912 | 20,195 |
111
+ | B-NORP | 44,956 | 5,445 | 5,751 |
112
+ | I-NORP | 58,288 | 6,986 | 7,502 |
113
+ | B-GPE | 133,887| 16,638 | 16,517 |
114
+ | I-GPE | 73,628 | 8,993 | 8,987 |
115
+ | B-WORK_OF_ART | 65,521 | 8,268 | 8,134 |
116
+ | I-WORK_OF_ART | 84,308 | 10,770 | 10,461 |
117
+ | B-CARDINAL | 6,560 | 880 | 875 |
118
+ | I-CARDINAL | 2,059 | 243 | 258 |
119
+ | I-GPE | 73,628 | 8,993 | 8,987 |
120
+ | B-MED | 9,347 | 1,173 | 1,177 |
121
+ | B-EVENT | 1,885 | 233 | 231 |
122
+ | I-EVENT | 4,422 | 579 | 532 |
123
+ | B-FAC | 10,167 | 1,305 | 1,261 |
124
+ | I-FAC | 12,465 | 1,599 | 1,501 |
125
+ | B-DATE | 11,712 | 1,407 | 1,451 |
126
+ | I-DATE | 12,323 | 1,537 | 1,544 |
127
+ | B-QUANTITY | 632 | 79 | 78 |
128
+ | I-QUANTITY | 1,162 | 155 | 146 |
129
+ | B-MONEY | 2,514 | 325 | 331 |
130
+ | I-MONEY | 5,383 | 738 | 726 |
131
+ | B-TIME | 1,468 | 179 | 200 |
132
+ | I-TIME | 1,844 | 234 | 266 |
133
+ | B-DISEASE | 8,524 | 1,072 | 1,021 |
134
+ | B-ORDINAL | 1,486 | 181 | 182 |
135
+ | I-DISEASE | 8,783 | 1,135 | 1,086 |
136
+ | B-LAW | 241 | 46 | 50 |
137
+ | I-MED | 4,457 | 605 | 600 |
138
+ | B-MISC | 3,477 | 474 | 435 |
139
+ | I-LAW | 498 | 103 | 131 |
140
+ | B-PERCENT | 1,895 | 249 | 190 |
141
+ | I-PERCENT | 2,340 | 313 | 243 |
142
+ | I-MISC | 1,819 | 238 | 210 |
143
+ | B-LANGUAGE | 280 | 38 | 25 |
144
+ | I-ORDINAL | 19 | 6 | 3 |
145
+ | I-LANGUAGE | 19 | 4 | 6 |
146
+
147
+ ## Usage
148
+
149
+ 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`.
150
+
151
+ ### Example Code
152
+
153
+ Here's an example of how you might load and use this dataset in Python using the `datasets` library:
154
+
155
+ ```python
156
+ from datasets import load_dataset
157
+
158
+ # Load the dataset
159
+ dataset = load_dataset("mansoorhamidzadeh/Persian-NER-Dataset-500k")
160
+
161
+ # Access the train, validation, and test sets
162
+ train_dataset = dataset['train']
163
+ validation_dataset = dataset['validation']
164
+ test_dataset = dataset['test']
165
+
166
+ # Example: Accessing the first example from the train set
167
+ print(train_dataset[0])
168
+ ```
169
+
170
+ ```bibtext
171
+ @dataset{hamidzadeh2024persian_ner_500k,
172
+ author = {Mansoor Hamidzadeh},
173
+ title = {Persian-NER-Dataset-500k},
174
+ year = 2024,
175
+ url = {https://huggingface.co/datasets/mansoorhamidzadeh/Persian-NER-Dataset-500k}
176
+ }
177
+ ```