Datasets:
Tasks:
Token Classification
Modalities:
Text
Formats:
parquet
Sub-tasks:
named-entity-recognition
Languages:
Afrikaans
Size:
1K - 10K
License:
Commit
•
445834a
1
Parent(s):
58eb3b7
Convert dataset to Parquet (#2)
Browse files- Convert dataset to Parquet (87ad41fb028daf6ea10f761015a5dbcf3bf4317d)
- Delete loading script (d08fe25039d0b99bb6857e0c14be15fa4cff5a4e)
- Delete legacy dataset_infos.json (ed5b3909d749022171a6019343054dc1847ee3cf)
- README.md +10 -4
- afrikaans_ner_corpus.py +0 -135
- afrikaans_ner_corpus/train-00000-of-00001.parquet +3 -0
- dataset_infos.json +0 -1
README.md
CHANGED
@@ -20,6 +20,7 @@ task_ids:
|
|
20 |
pretty_name: Afrikaans Ner Corpus
|
21 |
license_details: Creative Commons Attribution 2.5 South Africa License
|
22 |
dataset_info:
|
|
|
23 |
features:
|
24 |
- name: id
|
25 |
dtype: string
|
@@ -38,13 +39,18 @@ dataset_info:
|
|
38 |
'6': I-LOC
|
39 |
'7': B-MISC
|
40 |
'8': I-MISC
|
41 |
-
config_name: afrikaans_ner_corpus
|
42 |
splits:
|
43 |
- name: train
|
44 |
-
num_bytes:
|
45 |
num_examples: 8962
|
46 |
-
download_size:
|
47 |
-
dataset_size:
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
---
|
49 |
|
50 |
# Dataset Card for Afrikaans Ner Corpus
|
|
|
20 |
pretty_name: Afrikaans Ner Corpus
|
21 |
license_details: Creative Commons Attribution 2.5 South Africa License
|
22 |
dataset_info:
|
23 |
+
config_name: afrikaans_ner_corpus
|
24 |
features:
|
25 |
- name: id
|
26 |
dtype: string
|
|
|
39 |
'6': I-LOC
|
40 |
'7': B-MISC
|
41 |
'8': I-MISC
|
|
|
42 |
splits:
|
43 |
- name: train
|
44 |
+
num_bytes: 4025651
|
45 |
num_examples: 8962
|
46 |
+
download_size: 944804
|
47 |
+
dataset_size: 4025651
|
48 |
+
configs:
|
49 |
+
- config_name: afrikaans_ner_corpus
|
50 |
+
data_files:
|
51 |
+
- split: train
|
52 |
+
path: afrikaans_ner_corpus/train-*
|
53 |
+
default: true
|
54 |
---
|
55 |
|
56 |
# Dataset Card for Afrikaans Ner Corpus
|
afrikaans_ner_corpus.py
DELETED
@@ -1,135 +0,0 @@
|
|
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 |
-
|
18 |
-
import os
|
19 |
-
|
20 |
-
import datasets
|
21 |
-
|
22 |
-
|
23 |
-
logger = datasets.logging.get_logger(__name__)
|
24 |
-
|
25 |
-
|
26 |
-
_CITATION = """\
|
27 |
-
@inproceedings{afrikaans_ner_corpus,
|
28 |
-
author = { Gerhard van Huyssteen and
|
29 |
-
Martin Puttkammer and
|
30 |
-
E.B. Trollip and
|
31 |
-
J.C. Liversage and
|
32 |
-
Roald Eiselen},
|
33 |
-
title = {NCHLT Afrikaans Named Entity Annotated Corpus},
|
34 |
-
booktitle = {Eiselen, R. 2016. Government domain named entity recognition for South African languages. Proceedings of the 10th Language Resource and Evaluation Conference, Portorož, Slovenia.},
|
35 |
-
year = {2016},
|
36 |
-
url = {https://repo.sadilar.org/handle/20.500.12185/299},
|
37 |
-
}
|
38 |
-
"""
|
39 |
-
|
40 |
-
_DESCRIPTION = """\
|
41 |
-
Named entity annotated data from the NCHLT Text Resource Development: Phase II Project, annotated with PERSON, LOCATION, ORGANISATION and MISCELLANEOUS tags.
|
42 |
-
"""
|
43 |
-
|
44 |
-
_URL = "https://repo.sadilar.org/bitstream/handle/20.500.12185/299/nchlt_afrikaans_named_entity_annotated_corpus.zip?sequence=3&isAllowed=y"
|
45 |
-
|
46 |
-
|
47 |
-
_EXTRACTED_FILE = "NCHLT Afrikaans Named Entity Annotated Corpus/Dataset.NCHLT-II.AF.NER.Full.txt"
|
48 |
-
|
49 |
-
|
50 |
-
class AfrikaansNerCorpusConfig(datasets.BuilderConfig):
|
51 |
-
"""BuilderConfig for AfrikaansNerCorpus"""
|
52 |
-
|
53 |
-
def __init__(self, **kwargs):
|
54 |
-
"""BuilderConfig for AfrikaansNerCorpus.
|
55 |
-
Args:
|
56 |
-
**kwargs: keyword arguments forwarded to super.
|
57 |
-
"""
|
58 |
-
super(AfrikaansNerCorpusConfig, self).__init__(**kwargs)
|
59 |
-
|
60 |
-
|
61 |
-
class AfrikaansNerCorpus(datasets.GeneratorBasedBuilder):
|
62 |
-
"""Afrikaans Ner dataset"""
|
63 |
-
|
64 |
-
BUILDER_CONFIGS = [
|
65 |
-
AfrikaansNerCorpusConfig(
|
66 |
-
name="afrikaans_ner_corpus",
|
67 |
-
version=datasets.Version("1.0.0"),
|
68 |
-
description="AfrikaansNerCorpus dataset",
|
69 |
-
),
|
70 |
-
]
|
71 |
-
|
72 |
-
def _info(self):
|
73 |
-
return datasets.DatasetInfo(
|
74 |
-
description=_DESCRIPTION,
|
75 |
-
features=datasets.Features(
|
76 |
-
{
|
77 |
-
"id": datasets.Value("string"),
|
78 |
-
"tokens": datasets.Sequence(datasets.Value("string")),
|
79 |
-
"ner_tags": datasets.Sequence(
|
80 |
-
datasets.features.ClassLabel(
|
81 |
-
names=[
|
82 |
-
"OUT",
|
83 |
-
"B-PERS",
|
84 |
-
"I-PERS",
|
85 |
-
"B-ORG",
|
86 |
-
"I-ORG",
|
87 |
-
"B-LOC",
|
88 |
-
"I-LOC",
|
89 |
-
"B-MISC",
|
90 |
-
"I-MISC",
|
91 |
-
]
|
92 |
-
)
|
93 |
-
),
|
94 |
-
}
|
95 |
-
),
|
96 |
-
supervised_keys=None,
|
97 |
-
homepage="https://repo.sadilar.org/handle/20.500.12185/299",
|
98 |
-
citation=_CITATION,
|
99 |
-
)
|
100 |
-
|
101 |
-
def _split_generators(self, dl_manager):
|
102 |
-
data_dir = dl_manager.download_and_extract(_URL)
|
103 |
-
return [
|
104 |
-
datasets.SplitGenerator(
|
105 |
-
name=datasets.Split.TRAIN,
|
106 |
-
gen_kwargs={"filepath": os.path.join(data_dir, _EXTRACTED_FILE)},
|
107 |
-
),
|
108 |
-
]
|
109 |
-
|
110 |
-
def _generate_examples(self, filepath):
|
111 |
-
logger.info("⏳ Generating examples from = %s", filepath)
|
112 |
-
with open(filepath, encoding="utf-8") as f:
|
113 |
-
guid = 0
|
114 |
-
tokens = []
|
115 |
-
ner_tags = []
|
116 |
-
for line in f:
|
117 |
-
if line == "" or line == "\n":
|
118 |
-
if tokens:
|
119 |
-
yield guid, {
|
120 |
-
"id": str(guid),
|
121 |
-
"tokens": tokens,
|
122 |
-
"ner_tags": ner_tags,
|
123 |
-
}
|
124 |
-
guid += 1
|
125 |
-
tokens = []
|
126 |
-
ner_tags = []
|
127 |
-
else:
|
128 |
-
splits = line.split("\t")
|
129 |
-
tokens.append(splits[0])
|
130 |
-
ner_tags.append(splits[1].rstrip())
|
131 |
-
yield guid, {
|
132 |
-
"id": str(guid),
|
133 |
-
"tokens": tokens,
|
134 |
-
"ner_tags": ner_tags,
|
135 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
afrikaans_ner_corpus/train-00000-of-00001.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:aaee22630406daa12b3f9444f5a555b919b0ffc880764fedc1fed36514fe3881
|
3 |
+
size 944804
|
dataset_infos.json
DELETED
@@ -1 +0,0 @@
|
|
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}}
|
|
|
|