Datasets:
Tasks:
Token Classification
Modalities:
Text
Formats:
parquet
Sub-tasks:
named-entity-recognition
Languages:
Afrikaans
Size:
1K - 10K
License:
Commit
•
f8036ab
0
Parent(s):
Update files from the datasets library (from 1.2.0)
Browse filesRelease notes: https://github.com/huggingface/datasets/releases/tag/1.2.0
- .gitattributes +27 -0
- README.md +169 -0
- afrikaans_ner_corpus.py +134 -0
- dataset_infos.json +1 -0
- dummy/afrikaans_ner_corpus/1.0.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,169 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
annotations_creators:
|
3 |
+
- expert-generated
|
4 |
+
language_creators:
|
5 |
+
- expert-generated
|
6 |
+
languages:
|
7 |
+
- af
|
8 |
+
licenses:
|
9 |
+
- other-Creative Commons Attribution 2-5 South Africa License
|
10 |
+
multilinguality:
|
11 |
+
- monolingual
|
12 |
+
size_categories:
|
13 |
+
- 1K<n<10K
|
14 |
+
source_datasets:
|
15 |
+
- original
|
16 |
+
task_categories:
|
17 |
+
- structure-prediction
|
18 |
+
task_ids:
|
19 |
+
- named-entity-recognition
|
20 |
+
---
|
21 |
+
|
22 |
+
# Dataset Card for Afrikaans Ner Corpus
|
23 |
+
|
24 |
+
## Table of Contents
|
25 |
+
- [Dataset Description](#dataset-description)
|
26 |
+
- [Dataset Summary](#dataset-summary)
|
27 |
+
- [Supported Tasks](#supported-tasks-and-leaderboards)
|
28 |
+
- [Languages](#languages)
|
29 |
+
- [Dataset Structure](#dataset-structure)
|
30 |
+
- [Data Instances](#data-instances)
|
31 |
+
- [Data Fields](#data-instances)
|
32 |
+
- [Data Splits](#data-instances)
|
33 |
+
- [Dataset Creation](#dataset-creation)
|
34 |
+
- [Curation Rationale](#curation-rationale)
|
35 |
+
- [Source Data](#source-data)
|
36 |
+
- [Annotations](#annotations)
|
37 |
+
- [Personal and Sensitive Information](#personal-and-sensitive-information)
|
38 |
+
- [Considerations for Using the Data](#considerations-for-using-the-data)
|
39 |
+
- [Social Impact of Dataset](#social-impact-of-dataset)
|
40 |
+
- [Discussion of Biases](#discussion-of-biases)
|
41 |
+
- [Other Known Limitations](#other-known-limitations)
|
42 |
+
- [Additional Information](#additional-information)
|
43 |
+
- [Dataset Curators](#dataset-curators)
|
44 |
+
- [Licensing Information](#licensing-information)
|
45 |
+
- [Citation Information](#citation-information)
|
46 |
+
|
47 |
+
## Dataset Description
|
48 |
+
|
49 |
+
- **Homepage:** [Afrikaans Ner Corpus Homepage](https://repo.sadilar.org/handle/20.500.12185/299)
|
50 |
+
- **Repository:**
|
51 |
+
- **Paper:**
|
52 |
+
- **Leaderboard:**
|
53 |
+
- **Point of Contact:** [Martin Puttkammer](mailto:Martin.Puttkammer@nwu.ac.za)
|
54 |
+
|
55 |
+
### Dataset Summary
|
56 |
+
The Afrikaans Ner Corpus is an Afrikaans dataset developed by [The Centre for Text Technology (CTexT), North-West University, South Africa](http://humanities.nwu.ac.za/ctext). The data is based on documents from the South African goverment domain and crawled from gov.za websites. It was created to support NER task for Afrikaans language. The dataset uses CoNLL shared task annotation standards.
|
57 |
+
|
58 |
+
### Supported Tasks and Leaderboards
|
59 |
+
|
60 |
+
[More Information Needed]
|
61 |
+
|
62 |
+
### Languages
|
63 |
+
|
64 |
+
The language supported is Afrikaans.
|
65 |
+
|
66 |
+
## Dataset Structure
|
67 |
+
|
68 |
+
### Data Instances
|
69 |
+
|
70 |
+
A data point consists of sentences seperated by empty line and tab-seperated tokens and tags.
|
71 |
+
{'id': '0',
|
72 |
+
'ner_tags': [0, 0, 0, 0, 0],
|
73 |
+
'tokens': ['Vertaling', 'van', 'die', 'inligting', 'in']
|
74 |
+
}
|
75 |
+
|
76 |
+
### Data Fields
|
77 |
+
|
78 |
+
- `id`: id of the sample
|
79 |
+
- `tokens`: the tokens of the example text
|
80 |
+
- `ner_tags`: the NER tags of each token
|
81 |
+
|
82 |
+
The NER tags correspond to this list:
|
83 |
+
```
|
84 |
+
"OUT", "B-PERS", "I-PERS", "B-ORG", "I-ORG", "B-LOC", "I-LOC", "B-MISC", "I-MISC",
|
85 |
+
```
|
86 |
+
The NER tags have the same format as in the CoNLL shared task: a B denotes the first item of a phrase and an I any non-initial word. There are four types of phrases: person names (PER), organizations (ORG), locations (LOC) and miscellaneous names (MISC). (OUT) is used for tokens not considered part of any named entity.
|
87 |
+
|
88 |
+
### Data Splits
|
89 |
+
|
90 |
+
The data was not split.
|
91 |
+
|
92 |
+
## Dataset Creation
|
93 |
+
|
94 |
+
### Curation Rationale
|
95 |
+
|
96 |
+
The data was created to help introduce resources to new language - Afrikaans.
|
97 |
+
|
98 |
+
[More Information Needed]
|
99 |
+
|
100 |
+
### Source Data
|
101 |
+
|
102 |
+
#### Initial Data Collection and Normalization
|
103 |
+
|
104 |
+
The data is based on South African government domain and was crawled from gov.za websites.
|
105 |
+
|
106 |
+
[More Information Needed]
|
107 |
+
|
108 |
+
#### Who are the source language producers?
|
109 |
+
|
110 |
+
The data was produced by writers of South African government websites - gov.za
|
111 |
+
|
112 |
+
[More Information Needed]
|
113 |
+
|
114 |
+
### Annotations
|
115 |
+
|
116 |
+
#### Annotation process
|
117 |
+
|
118 |
+
[More Information Needed]
|
119 |
+
|
120 |
+
#### Who are the annotators?
|
121 |
+
|
122 |
+
The data was annotated during the NCHLT text resource development project.
|
123 |
+
|
124 |
+
[More Information Needed]
|
125 |
+
|
126 |
+
### Personal and Sensitive Information
|
127 |
+
|
128 |
+
[More Information Needed]
|
129 |
+
|
130 |
+
## Considerations for Using the Data
|
131 |
+
|
132 |
+
### Social Impact of Dataset
|
133 |
+
|
134 |
+
[More Information Needed]
|
135 |
+
|
136 |
+
### Discussion of Biases
|
137 |
+
|
138 |
+
[More Information Needed]
|
139 |
+
|
140 |
+
### Other Known Limitations
|
141 |
+
|
142 |
+
[More Information Needed]
|
143 |
+
|
144 |
+
## Additional Information
|
145 |
+
|
146 |
+
### Dataset Curators
|
147 |
+
|
148 |
+
The annotated data sets were developed by the Centre for Text Technology (CTexT, North-West University, South Africa).
|
149 |
+
|
150 |
+
See: [more information](http://www.nwu.ac.za/ctext)
|
151 |
+
|
152 |
+
### Licensing Information
|
153 |
+
|
154 |
+
The data is under the [Creative Commons Attribution 2.5 South Africa License](http://creativecommons.org/licenses/by/2.5/za/legalcode)
|
155 |
+
|
156 |
+
### Citation Information
|
157 |
+
```
|
158 |
+
@inproceedings{afrikaans_ner_corpus,
|
159 |
+
author = { Gerhard van Huyssteen and
|
160 |
+
Martin Puttkammer and
|
161 |
+
E.B. Trollip and
|
162 |
+
J.C. Liversage and
|
163 |
+
Roald Eiselen},
|
164 |
+
title = {NCHLT Afrikaans Named Entity Annotated Corpus},
|
165 |
+
booktitle = {Eiselen, R. 2016. Government domain named entity recognition for South African languages. Proceedings of the 10th Language Resource and Evaluation Conference, Portorož, Slovenia.},
|
166 |
+
year = {2016},
|
167 |
+
url = {https://repo.sadilar.org/handle/20.500.12185/299},
|
168 |
+
}
|
169 |
+
```
|
afrikaans_ner_corpus.py
ADDED
@@ -0,0 +1,134 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
""" Named entity annotated data from the NCHLT Text Resource Development: Phase II Project for Afrikaans"""
|
16 |
+
|
17 |
+
from __future__ import absolute_import, division, print_function
|
18 |
+
|
19 |
+
import logging
|
20 |
+
import os
|
21 |
+
|
22 |
+
import datasets
|
23 |
+
|
24 |
+
|
25 |
+
_CITATION = """\
|
26 |
+
@inproceedings{afrikaans_ner_corpus,
|
27 |
+
author = { Gerhard van Huyssteen and
|
28 |
+
Martin Puttkammer and
|
29 |
+
E.B. Trollip and
|
30 |
+
J.C. Liversage and
|
31 |
+
Roald Eiselen},
|
32 |
+
title = {NCHLT Afrikaans Named Entity Annotated Corpus},
|
33 |
+
booktitle = {Eiselen, R. 2016. Government domain named entity recognition for South African languages. Proceedings of the 10th Language Resource and Evaluation Conference, Portorož, Slovenia.},
|
34 |
+
year = {2016},
|
35 |
+
url = {https://repo.sadilar.org/handle/20.500.12185/299},
|
36 |
+
}
|
37 |
+
"""
|
38 |
+
|
39 |
+
_DESCRIPTION = """\
|
40 |
+
Named entity annotated data from the NCHLT Text Resource Development: Phase II Project, annotated with PERSON, LOCATION, ORGANISATION and MISCELLANEOUS tags.
|
41 |
+
"""
|
42 |
+
|
43 |
+
_URL = "https://repo.sadilar.org/bitstream/handle/20.500.12185/299/nchlt_afrikaans_named_entity_annotated_corpus.zip?sequence=3&isAllowed=y"
|
44 |
+
|
45 |
+
|
46 |
+
_EXTRACTED_FILE = "NCHLT Afrikaans Named Entity Annotated Corpus/Dataset.NCHLT-II.AF.NER.Full.txt"
|
47 |
+
|
48 |
+
|
49 |
+
class AfrikaansNerCorpusConfig(datasets.BuilderConfig):
|
50 |
+
"""BuilderConfig for AfrikaansNerCorpus"""
|
51 |
+
|
52 |
+
def __init__(self, **kwargs):
|
53 |
+
"""BuilderConfig for AfrikaansNerCorpus.
|
54 |
+
Args:
|
55 |
+
**kwargs: keyword arguments forwarded to super.
|
56 |
+
"""
|
57 |
+
super(AfrikaansNerCorpusConfig, self).__init__(**kwargs)
|
58 |
+
|
59 |
+
|
60 |
+
class AfrikaansNerCorpus(datasets.GeneratorBasedBuilder):
|
61 |
+
""" Afrikaans Ner dataset"""
|
62 |
+
|
63 |
+
BUILDER_CONFIGS = [
|
64 |
+
AfrikaansNerCorpusConfig(
|
65 |
+
name="afrikaans_ner_corpus",
|
66 |
+
version=datasets.Version("1.0.0"),
|
67 |
+
description="AfrikaansNerCorpus dataset",
|
68 |
+
),
|
69 |
+
]
|
70 |
+
|
71 |
+
def _info(self):
|
72 |
+
return datasets.DatasetInfo(
|
73 |
+
description=_DESCRIPTION,
|
74 |
+
features=datasets.Features(
|
75 |
+
{
|
76 |
+
"id": datasets.Value("string"),
|
77 |
+
"tokens": datasets.Sequence(datasets.Value("string")),
|
78 |
+
"ner_tags": datasets.Sequence(
|
79 |
+
datasets.features.ClassLabel(
|
80 |
+
names=[
|
81 |
+
"OUT",
|
82 |
+
"B-PERS",
|
83 |
+
"I-PERS",
|
84 |
+
"B-ORG",
|
85 |
+
"I-ORG",
|
86 |
+
"B-LOC",
|
87 |
+
"I-LOC",
|
88 |
+
"B-MISC",
|
89 |
+
"I-MISC",
|
90 |
+
]
|
91 |
+
)
|
92 |
+
),
|
93 |
+
}
|
94 |
+
),
|
95 |
+
supervised_keys=None,
|
96 |
+
homepage="https://repo.sadilar.org/handle/20.500.12185/299",
|
97 |
+
citation=_CITATION,
|
98 |
+
)
|
99 |
+
|
100 |
+
def _split_generators(self, dl_manager):
|
101 |
+
data_dir = dl_manager.download_and_extract(_URL)
|
102 |
+
return [
|
103 |
+
datasets.SplitGenerator(
|
104 |
+
name=datasets.Split.TRAIN,
|
105 |
+
gen_kwargs={"filepath": os.path.join(data_dir, _EXTRACTED_FILE)},
|
106 |
+
),
|
107 |
+
]
|
108 |
+
|
109 |
+
def _generate_examples(self, filepath):
|
110 |
+
logging.info("⏳ Generating examples from = %s", filepath)
|
111 |
+
with open(filepath, encoding="utf-8") as f:
|
112 |
+
guid = 0
|
113 |
+
tokens = []
|
114 |
+
ner_tags = []
|
115 |
+
for line in f:
|
116 |
+
if line == "" or line == "\n":
|
117 |
+
if tokens:
|
118 |
+
yield guid, {
|
119 |
+
"id": str(guid),
|
120 |
+
"tokens": tokens,
|
121 |
+
"ner_tags": ner_tags,
|
122 |
+
}
|
123 |
+
guid += 1
|
124 |
+
tokens = []
|
125 |
+
ner_tags = []
|
126 |
+
else:
|
127 |
+
splits = line.split("\t")
|
128 |
+
tokens.append(splits[0])
|
129 |
+
ner_tags.append(splits[1].rstrip())
|
130 |
+
yield guid, {
|
131 |
+
"id": str(guid),
|
132 |
+
"tokens": tokens,
|
133 |
+
"ner_tags": ner_tags,
|
134 |
+
}
|
dataset_infos.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"afrikaans_ner_corpus": {"description": "Named entity annotated data from the NCHLT Text Resource Development: Phase II Project, annotated with PERSON, LOCATION, ORGANISATION and MISCELLANEOUS tags.\n", "citation": "@inproceedings{afrikaans_ner_corpus,\n author = {\tGerhard van Huyssteen and\n Martin Puttkammer and\n E.B. Trollip and\n J.C. Liversage and\n Roald Eiselen},\n title = {NCHLT Afrikaans Named Entity Annotated Corpus},\n booktitle = {Eiselen, R. 2016. Government domain named entity recognition for South African languages. Proceedings of the 10th Language Resource and Evaluation Conference, Portoro\u017e, Slovenia.},\n year = {2016},\n url = {https://repo.sadilar.org/handle/20.500.12185/299},\n}\n", "homepage": "https://repo.sadilar.org/handle/20.500.12185/299", "license": "", "features": {"id": {"dtype": "string", "id": null, "_type": "Value"}, "tokens": {"feature": {"dtype": "string", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}, "ner_tags": {"feature": {"num_classes": 9, "names": ["OUT", "B-PERS", "I-PERS", "B-ORG", "I-ORG", "B-LOC", "I-LOC", "B-MISC", "I-MISC"], "names_file": null, "id": null, "_type": "ClassLabel"}, "length": -1, "id": null, "_type": "Sequence"}}, "post_processed": null, "supervised_keys": null, "builder_name": "afrikaans_ner_corpus", "config_name": "afrikaans_ner_corpus", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 4025667, "num_examples": 8962, "dataset_name": "afrikaans_ner_corpus"}}, "download_checksums": {"https://repo.sadilar.org/bitstream/handle/20.500.12185/299/nchlt_afrikaans_named_entity_annotated_corpus.zip?sequence=3&isAllowed=y": {"num_bytes": 25748344, "checksum": "cd609b86c1ab5505f24a5a2ca8b2ceb023fcd779b86ecf94c467b7f085c80ed9"}}, "download_size": 25748344, "post_processing_size": null, "dataset_size": 4025667, "size_in_bytes": 29774011}}
|
dummy/afrikaans_ner_corpus/1.0.0/dummy_data.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:2c2bc5058e0f117ef013f46534176030e67a14eeef12fd21c2b9f44b960890c2
|
3 |
+
size 1679
|