system HF staff commited on
Commit
be43e59
0 Parent(s):

Update files from the datasets library (from 1.3.0)

Browse files

Release notes: https://github.com/huggingface/datasets/releases/tag/1.3.0

Files changed (5) hide show
  1. .gitattributes +27 -0
  2. README.md +182 -0
  3. caner.py +127 -0
  4. dataset_infos.json +1 -0
  5. dummy/1.1.0/dummy_data.zip +3 -0
.gitattributes ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bin.* filter=lfs diff=lfs merge=lfs -text
5
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.model filter=lfs diff=lfs merge=lfs -text
12
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
13
+ *.onnx filter=lfs diff=lfs merge=lfs -text
14
+ *.ot filter=lfs diff=lfs merge=lfs -text
15
+ *.parquet filter=lfs diff=lfs merge=lfs -text
16
+ *.pb filter=lfs diff=lfs merge=lfs -text
17
+ *.pt filter=lfs diff=lfs merge=lfs -text
18
+ *.pth filter=lfs diff=lfs merge=lfs -text
19
+ *.rar filter=lfs diff=lfs merge=lfs -text
20
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
21
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
22
+ *.tflite filter=lfs diff=lfs merge=lfs -text
23
+ *.tgz filter=lfs diff=lfs merge=lfs -text
24
+ *.xz filter=lfs diff=lfs merge=lfs -text
25
+ *.zip filter=lfs diff=lfs merge=lfs -text
26
+ *.zstandard filter=lfs diff=lfs merge=lfs -text
27
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,182 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ annotations_creators:
3
+ - expert-generated
4
+ language_creators:
5
+ - expert-generated
6
+ languages:
7
+ - ar
8
+ licenses: []
9
+ multilinguality:
10
+ - monolingual
11
+ size_categories:
12
+ - 100K<n<1M
13
+ source_datasets:
14
+ - original
15
+ task_categories:
16
+ - structure-prediction
17
+ task_ids:
18
+ - named-entity-recognition
19
+ ---
20
+
21
+ # Dataset Card for CANER
22
+
23
+ ## Table of Contents
24
+ - [Dataset Description](#dataset-description)
25
+ - [Dataset Summary](#dataset-summary)
26
+ - [Supported Tasks](#supported-tasks-and-leaderboards)
27
+ - [Languages](#languages)
28
+ - [Dataset Structure](#dataset-structure)
29
+ - [Data Instances](#data-instances)
30
+ - [Data Fields](#data-instances)
31
+ - [Data Splits](#data-instances)
32
+ - [Dataset Creation](#dataset-creation)
33
+ - [Curation Rationale](#curation-rationale)
34
+ - [Source Data](#source-data)
35
+ - [Annotations](#annotations)
36
+ - [Personal and Sensitive Information](#personal-and-sensitive-information)
37
+ - [Considerations for Using the Data](#considerations-for-using-the-data)
38
+ - [Social Impact of Dataset](#social-impact-of-dataset)
39
+ - [Discussion of Biases](#discussion-of-biases)
40
+ - [Other Known Limitations](#other-known-limitations)
41
+ - [Additional Information](#additional-information)
42
+ - [Dataset Curators](#dataset-curators)
43
+ - [Licensing Information](#licensing-information)
44
+ - [Citation Information](#citation-information)
45
+ - [Contributions](#contributions)
46
+
47
+ ## Dataset Description
48
+
49
+ - **Homepage:**
50
+ - **Repository:** [Classical-Arabic-Named-Entity-Recognition-Corpus](https://github.com/RamziSalah)
51
+ - **Paper:** [Researchgate](https://www.researchgate.net/publication/330075080_BUILDING_THE_CLASSICAL_ARABIC_NAMED_ENTITY_RECOGNITION_CORPUS_CANERCORPUS)
52
+ - **Leaderboard:**
53
+ - **Point of Contact:**
54
+
55
+ ### Dataset Summary
56
+
57
+ The Classical Arabic Named Entity Recognition corpus is a new corpus of tagged data that can be useful for handling the issues in recognition of Arabic named entities.
58
+
59
+ ### Supported Tasks and Leaderboards
60
+
61
+ - Named Entity Recognition
62
+
63
+ ### Languages
64
+
65
+ Classical Arabic
66
+
67
+ ## Dataset Structure
68
+
69
+ ### Data Instances
70
+
71
+ An example from the dataset:
72
+ ```
73
+ {'ner_tag': 1, 'token': 'الجامع'}
74
+ ```
75
+ Where 1 stands for "Book"
76
+
77
+ ### Data Fields
78
+
79
+ - `id`: id of the sample
80
+ - `token`: the tokens of the example text
81
+ - `ner_tag`: the NER tags of each token
82
+
83
+ The NER tags correspond to this list:
84
+ ```
85
+ "Allah",
86
+ "Book",
87
+ "Clan",
88
+ "Crime",
89
+ "Date",
90
+ "Day",
91
+ "Hell",
92
+ "Loc",
93
+ "Meas",
94
+ "Mon",
95
+ "Month",
96
+ "NatOb",
97
+ "Number",
98
+ "O",
99
+ "Org",
100
+ "Para",
101
+ "Pers",
102
+ "Prophet",
103
+ "Rlig",
104
+ "Sect",
105
+ "Time"
106
+ ```
107
+
108
+ ### Data Splits
109
+
110
+ Training splits only
111
+
112
+ ## Dataset Creation
113
+
114
+ ### Curation Rationale
115
+
116
+ [More Information Needed]
117
+
118
+ ### Source Data
119
+
120
+ #### Initial Data Collection and Normalization
121
+
122
+ [More Information Needed]
123
+
124
+ #### Who are the source language producers?
125
+
126
+ [More Information Needed]
127
+
128
+ ### Annotations
129
+
130
+ #### Annotation process
131
+
132
+ [More Information Needed]
133
+
134
+ #### Who are the annotators?
135
+
136
+ Ramzi Salah and Lailatul Qadri Zakaria
137
+
138
+ ### Personal and Sensitive Information
139
+
140
+ [More Information Needed]
141
+
142
+ ## Considerations for Using the Data
143
+
144
+ ### Social Impact of Dataset
145
+
146
+ [More Information Needed]
147
+
148
+ ### Discussion of Biases
149
+
150
+ [More Information Needed]
151
+
152
+ ### Other Known Limitations
153
+
154
+ [More Information Needed]
155
+
156
+ ## Additional Information
157
+
158
+ [More Information Needed]
159
+
160
+ ### Dataset Curators
161
+
162
+ [More Information Needed]
163
+
164
+ ### Licensing Information
165
+
166
+ [More Information Needed]
167
+
168
+ ### Citation Information
169
+
170
+ @article{article,
171
+ author = {Salah, Ramzi and Zakaria, Lailatul},
172
+ year = {2018},
173
+ month = {12},
174
+ pages = {},
175
+ title = {BUILDING THE CLASSICAL ARABIC NAMED ENTITY RECOGNITION CORPUS (CANERCORPUS)},
176
+ volume = {96},
177
+ journal = {Journal of Theoretical and Applied Information Technology}
178
+ }
179
+
180
+ ### Contributions
181
+
182
+ Thanks to [@KMFODA](https://github.com/KMFODA) for adding this dataset.
caner.py ADDED
@@ -0,0 +1,127 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # coding=utf-8
2
+ # Copyright 2020 The HuggingFace Datasets Authors and the current dataset script contributor.
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+ """A new corpus of tagged data that can be useful for handling the issues in recognition of Classical Arabic named entities"""
16
+
17
+ from __future__ import absolute_import, division, print_function
18
+
19
+ import csv
20
+ import os
21
+
22
+ import datasets
23
+
24
+
25
+ _CITATION = """\
26
+ @article{article,
27
+ author = {Salah, Ramzi and Zakaria, Lailatul},
28
+ year = {2018},
29
+ month = {12},
30
+ pages = {},
31
+ title = {BUILDING THE CLASSICAL ARABIC NAMED ENTITY RECOGNITION CORPUS (CANERCORPUS)},
32
+ volume = {96},
33
+ journal = {Journal of Theoretical and Applied Information Technology}
34
+ }
35
+ """
36
+
37
+ _DESCRIPTION = """\
38
+ Classical Arabic Named Entity Recognition corpus as a new corpus of tagged data that can be useful for handling the issues in recognition of Arabic named entities.
39
+ """
40
+
41
+ _HOMEPAGE = "https://github.com/RamziSalah/Classical-Arabic-Named-Entity-Recognition-Corpus"
42
+
43
+ # TODO: Add the licence for the dataset here if you can find it
44
+ _LICENSE = ""
45
+
46
+ _URL = "https://github.com/RamziSalah/Classical-Arabic-Named-Entity-Recognition-Corpus/archive/master.zip"
47
+
48
+
49
+ class Caner(datasets.GeneratorBasedBuilder):
50
+ """Classical Arabic Named Entity Recognition corpus as a new corpus of tagged data that can be useful for handling the issues in recognition of Arabic named entities"""
51
+
52
+ VERSION = datasets.Version("1.1.0")
53
+
54
+ def _info(self):
55
+
56
+ features = datasets.Features(
57
+ {
58
+ "token": datasets.Value("string"),
59
+ "ner_tag": datasets.ClassLabel(
60
+ names=[
61
+ "Allah",
62
+ "Book",
63
+ "Clan",
64
+ "Crime",
65
+ "Date",
66
+ "Day",
67
+ "Hell",
68
+ "Loc",
69
+ "Meas",
70
+ "Mon",
71
+ "Month",
72
+ "NatOb",
73
+ "Number",
74
+ "O",
75
+ "Org",
76
+ "Para",
77
+ "Pers",
78
+ "Prophet",
79
+ "Rlig",
80
+ "Sect",
81
+ "Time",
82
+ ]
83
+ ),
84
+ }
85
+ )
86
+
87
+ return datasets.DatasetInfo(
88
+ description=_DESCRIPTION,
89
+ features=features,
90
+ supervised_keys=None,
91
+ homepage=_HOMEPAGE,
92
+ license=_LICENSE,
93
+ citation=_CITATION,
94
+ )
95
+
96
+ def _split_generators(self, dl_manager):
97
+ """Returns SplitGenerators."""
98
+
99
+ my_urls = _URL
100
+ data_dir = dl_manager.download_and_extract(my_urls)
101
+
102
+ return [
103
+ datasets.SplitGenerator(
104
+ name=datasets.Split.TRAIN,
105
+ # These kwargs will be passed to _generate_examples
106
+ gen_kwargs={
107
+ "filepath": os.path.join(
108
+ data_dir, "Classical-Arabic-Named-Entity-Recognition-Corpus-master/CANERCorpus.csv"
109
+ ),
110
+ "split": "train",
111
+ },
112
+ )
113
+ ]
114
+
115
+ def _generate_examples(self, filepath, split):
116
+ """ Yields examples. """
117
+
118
+ with open(filepath, encoding="utf-8") as csv_file:
119
+ reader = csv.reader(csv_file, delimiter=",")
120
+ next(reader, None)
121
+
122
+ for id_, row in enumerate(reader):
123
+
124
+ yield id_, {
125
+ "token": row[0],
126
+ "ner_tag": row[1],
127
+ }
dataset_infos.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"default": {"description": "Classical Arabic Named Entity Recognition corpus as a new corpus of tagged data that can be useful for handling the issues in recognition of Arabic named entities.\n", "citation": "@article{article,\nauthor = {Salah, Ramzi and Zakaria, Lailatul},\nyear = {2018},\nmonth = {12},\npages = {},\ntitle = {BUILDING THE CLASSICAL ARABIC NAMED ENTITY RECOGNITION CORPUS (CANERCORPUS)},\nvolume = {96},\njournal = {Journal of Theoretical and Applied Information Technology}\n}\n", "homepage": "https://github.com/RamziSalah/Classical-Arabic-Named-Entity-Recognition-Corpus", "license": "", "features": {"token": {"dtype": "string", "id": null, "_type": "Value"}, "ner_tag": {"num_classes": 21, "names": ["Allah", "Book", "Clan", "Crime", "Date", "Day", "Hell", "Loc", "Meas", "Mon", "Month", "NatOb", "Number", "O", "Org", "Para", "Pers", "Prophet", "Rlig", "Sect", "Time"], "names_file": null, "id": null, "_type": "ClassLabel"}}, "post_processed": null, "supervised_keys": null, "builder_name": "caner", "config_name": "default", "version": {"version_str": "1.1.0", "description": null, "major": 1, "minor": 1, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 5095721, "num_examples": 258240, "dataset_name": "caner"}}, "download_checksums": {"https://github.com/RamziSalah/Classical-Arabic-Named-Entity-Recognition-Corpus/archive/master.zip": {"num_bytes": 17063406, "checksum": "b4f6bbcc1074dfb9a6cf53fbbd5825a8eafbff842cd89ed20ab33f5b3ef6cddb"}}, "download_size": 17063406, "post_processing_size": null, "dataset_size": 5095721, "size_in_bytes": 22159127}}
dummy/1.1.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:44592571105422941e01b14dfebb6900c3cd5297ea547e3a649b94c5e32a1e16
3
+ size 2905