Datasets:
Tasks:
Token Classification
Modalities:
Text
Formats:
parquet
Sub-tasks:
named-entity-recognition
Languages:
Polish
Size:
10K - 100K
License:
Commit
•
24e1824
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 +153 -0
- dataset_infos.json +1 -0
- dummy/1.1.0/dummy_data.zip +3 -0
- nkjp-ner.py +106 -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,153 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
annotations_creators:
|
3 |
+
- expert-generated
|
4 |
+
language_creators:
|
5 |
+
- other
|
6 |
+
languages:
|
7 |
+
- pl
|
8 |
+
licenses:
|
9 |
+
- gpl-3-0
|
10 |
+
multilinguality:
|
11 |
+
- monolingual
|
12 |
+
size_categories:
|
13 |
+
- 10K<n<100K
|
14 |
+
source_datasets:
|
15 |
+
- original
|
16 |
+
task_categories:
|
17 |
+
- structure-prediction
|
18 |
+
task_ids:
|
19 |
+
- named-entity-recognition
|
20 |
+
---
|
21 |
+
|
22 |
+
# Dataset Card for [Dataset Name]
|
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:**
|
50 |
+
http://nkjp.pl/index.php?page=0&lang=1
|
51 |
+
- **Repository:**
|
52 |
+
- **Paper:**
|
53 |
+
@book{przepiorkowski2012narodowy,
|
54 |
+
title={Narodowy korpus j{\k{e}}zyka polskiego},
|
55 |
+
author={Przepi{\'o}rkowski, Adam},
|
56 |
+
year={2012},
|
57 |
+
publisher={Naukowe PWN}
|
58 |
+
- **Leaderboard:**
|
59 |
+
- **Point of Contact:**
|
60 | |
61 |
+
|
62 |
+
### Dataset Summary
|
63 |
+
|
64 |
+
A linguistic corpus is a collection of texts where one can find the typical use of a single word or a phrase, as well as their meaning and grammatical function. Nowadays, without access to a language corpus, it has become impossible to do linguistic research, to write dictionaries, grammars and language teaching books, to create search engines sensitive to Polish inflection, machine translation engines and software of advanced language technology. Language corpora have become an essential tool for linguists, but they are also helpful for software engineers, scholars of literature and culture, historians, librarians and other specialists of art and computer sciences.
|
65 |
+
The manually annotated 1-million word subcorpus of the NJKP, available on GNU GPL v.3
|
66 |
+
|
67 |
+
### Supported Tasks and Leaderboards
|
68 |
+
|
69 |
+
Named entity recognition
|
70 |
+
|
71 |
+
[More Information Needed]
|
72 |
+
|
73 |
+
### Languages
|
74 |
+
|
75 |
+
Polish
|
76 |
+
|
77 |
+
## Dataset Structure
|
78 |
+
|
79 |
+
### Data Instances
|
80 |
+
|
81 |
+
Two tsv files (train, dev) with two columns (sentence, target) and one (test) with just one (sentence).
|
82 |
+
|
83 |
+
### Data Fields
|
84 |
+
|
85 |
+
- sentence
|
86 |
+
- target
|
87 |
+
|
88 |
+
### Data Splits
|
89 |
+
|
90 |
+
Data is splitted in train/dev/test split.
|
91 |
+
|
92 |
+
## Dataset Creation
|
93 |
+
|
94 |
+
### Curation Rationale
|
95 |
+
|
96 |
+
This dataset is one of nine evaluation tasks to improve polish language processing.
|
97 |
+
|
98 |
+
### Source Data
|
99 |
+
|
100 |
+
#### Initial Data Collection and Normalization
|
101 |
+
|
102 |
+
[More Information Needed]
|
103 |
+
|
104 |
+
#### Who are the source language producers?
|
105 |
+
|
106 |
+
[More Information Needed]
|
107 |
+
|
108 |
+
### Annotations
|
109 |
+
|
110 |
+
#### Annotation process
|
111 |
+
|
112 |
+
[More Information Needed]
|
113 |
+
|
114 |
+
#### Who are the annotators?
|
115 |
+
|
116 |
+
[More Information Needed]
|
117 |
+
|
118 |
+
### Personal and Sensitive Information
|
119 |
+
|
120 |
+
[More Information Needed]
|
121 |
+
|
122 |
+
## Considerations for Using the Data
|
123 |
+
|
124 |
+
### Social Impact of Dataset
|
125 |
+
|
126 |
+
[More Information Needed]
|
127 |
+
|
128 |
+
### Discussion of Biases
|
129 |
+
|
130 |
+
[More Information Needed]
|
131 |
+
|
132 |
+
### Other Known Limitations
|
133 |
+
|
134 |
+
[More Information Needed]
|
135 |
+
|
136 |
+
## Additional Information
|
137 |
+
|
138 |
+
### Dataset Curators
|
139 |
+
|
140 |
+
[More Information Needed]
|
141 |
+
|
142 |
+
### Licensing Information
|
143 |
+
|
144 |
+
GNU GPL v.3
|
145 |
+
|
146 |
+
### Citation Information
|
147 |
+
|
148 |
+
@book{przepiorkowski2012narodowy,
|
149 |
+
title={Narodowy korpus j{\k{e}}zyka polskiego},
|
150 |
+
author={Przepi{\'o}rkowski, Adam},
|
151 |
+
year={2012},
|
152 |
+
publisher={Naukowe PWN}
|
153 |
+
}
|
dataset_infos.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"default": {"description": "The NKJP-NER is based on a human-annotated part of National Corpus of Polish (NKJP). We extracted sentences with named entities of exactly one type. The task is to predict the type of the named entity.\n", "citation": "@book{przepiorkowski2012narodowy,\ntitle={Narodowy korpus j{\\k{e}}zyka polskiego},\nauthor={Przepi{'o}rkowski, Adam},\nyear={2012},\npublisher={Naukowe PWN}\n}\n", "homepage": "https://klejbenchmark.com/tasks/", "license": "GNU GPL v.3", "features": {"sentence": {"dtype": "string", "id": null, "_type": "Value"}, "target": {"num_classes": 6, "names": ["geogName", "noEntity", "orgName", "persName", "placeName", "time"], "names_file": null, "id": null, "_type": "ClassLabel"}}, "post_processed": null, "supervised_keys": null, "builder_name": "nkjp_ner", "config_name": "default", "version": {"version_str": "1.1.0", "description": null, "major": 1, "minor": 1, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 1612125, "num_examples": 15794, "dataset_name": "nkjp_ner"}, "test": {"name": "test", "num_bytes": 221092, "num_examples": 2058, "dataset_name": "nkjp_ner"}, "validation": {"name": "validation", "num_bytes": 196652, "num_examples": 1941, "dataset_name": "nkjp_ner"}}, "download_checksums": {"https://klejbenchmark.com/static/data/klej_nkjp-ner.zip": {"num_bytes": 821629, "checksum": "4b4573219731b198d43958e347dcd3e83654c89daa980c88de3bec8d628044ac"}}, "download_size": 821629, "post_processing_size": null, "dataset_size": 2029869, "size_in_bytes": 2851498}}
|
dummy/1.1.0/dummy_data.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:5ed7ae1eecf9fcc202b1bf145f80739eab760301e26398f897a88a9317f268a9
|
3 |
+
size 1294
|
nkjp-ner.py
ADDED
@@ -0,0 +1,106 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
"""NKJP-NER"""
|
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 |
+
@book{przepiorkowski2012narodowy,
|
27 |
+
title={Narodowy korpus jezyka polskiego},
|
28 |
+
author={Przepi{\'o}rkowski, Adam},
|
29 |
+
year={2012},
|
30 |
+
publisher={Naukowe PWN}
|
31 |
+
}
|
32 |
+
"""
|
33 |
+
|
34 |
+
_DESCRIPTION = """\
|
35 |
+
The NKJP-NER is based on a human-annotated part of National Corpus of Polish (NKJP). We extracted sentences with named entities of exactly one type. The task is to predict the type of the named entity.
|
36 |
+
"""
|
37 |
+
|
38 |
+
_HOMEPAGE = "https://klejbenchmark.com/tasks/"
|
39 |
+
|
40 |
+
_LICENSE = "GNU GPL v.3"
|
41 |
+
|
42 |
+
_URLs = "https://klejbenchmark.com/static/data/klej_nkjp-ner.zip"
|
43 |
+
|
44 |
+
|
45 |
+
class NkjpNer(datasets.GeneratorBasedBuilder):
|
46 |
+
"""NKJP-NER"""
|
47 |
+
|
48 |
+
VERSION = datasets.Version("1.1.0")
|
49 |
+
|
50 |
+
def _info(self):
|
51 |
+
return datasets.DatasetInfo(
|
52 |
+
description=_DESCRIPTION,
|
53 |
+
features=datasets.Features(
|
54 |
+
{
|
55 |
+
"sentence": datasets.Value("string"),
|
56 |
+
"target": datasets.ClassLabel(
|
57 |
+
names=[
|
58 |
+
"geogName",
|
59 |
+
"noEntity",
|
60 |
+
"orgName",
|
61 |
+
"persName",
|
62 |
+
"placeName",
|
63 |
+
"time",
|
64 |
+
]
|
65 |
+
),
|
66 |
+
}
|
67 |
+
),
|
68 |
+
supervised_keys=None,
|
69 |
+
homepage=_HOMEPAGE,
|
70 |
+
license=_LICENSE,
|
71 |
+
citation=_CITATION,
|
72 |
+
)
|
73 |
+
|
74 |
+
def _split_generators(self, dl_manager):
|
75 |
+
"""Returns SplitGenerators."""
|
76 |
+
data_dir = dl_manager.download_and_extract(_URLs)
|
77 |
+
return [
|
78 |
+
datasets.SplitGenerator(
|
79 |
+
name=datasets.Split.TRAIN,
|
80 |
+
gen_kwargs={
|
81 |
+
"filepath": os.path.join(data_dir, "train.tsv"),
|
82 |
+
"split": "train",
|
83 |
+
},
|
84 |
+
),
|
85 |
+
datasets.SplitGenerator(
|
86 |
+
name=datasets.Split.TEST,
|
87 |
+
gen_kwargs={"filepath": os.path.join(data_dir, "test_features.tsv"), "split": "test"},
|
88 |
+
),
|
89 |
+
datasets.SplitGenerator(
|
90 |
+
name=datasets.Split.VALIDATION,
|
91 |
+
gen_kwargs={
|
92 |
+
"filepath": os.path.join(data_dir, "dev.tsv"),
|
93 |
+
"split": "dev",
|
94 |
+
},
|
95 |
+
),
|
96 |
+
]
|
97 |
+
|
98 |
+
def _generate_examples(self, filepath, split):
|
99 |
+
""" Yields examples. """
|
100 |
+
with open(filepath, encoding="utf-8") as f:
|
101 |
+
reader = csv.DictReader(f, delimiter="\t", quoting=csv.QUOTE_NONE)
|
102 |
+
for id_, row in enumerate(reader):
|
103 |
+
yield id_, {
|
104 |
+
"sentence": row["sentence"],
|
105 |
+
"target": -1 if split == "test" else row["target"],
|
106 |
+
}
|