Datasets:
Tasks:
Token Classification
Sub-tasks:
named-entity-recognition
Languages:
English
Size:
1K<n<10K
License:
Commit
•
db524ef
0
Parent(s):
Update files from the datasets library (from 1.0.0)
Browse filesRelease notes: https://github.com/huggingface/datasets/releases/tag/1.0.0
- .gitattributes +27 -0
- dataset_infos.json +1 -0
- dummy/wnut_17/1.0.0/dummy_data.zip +3 -0
- wnut_17.py +157 -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
|
dataset_infos.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"wnut_17": {"description": "WNUT 17: Emerging and Rare entity recognition\n\nThis shared task focuses on identifying unusual, previously-unseen entities in the context of emerging discussions.\nNamed entities form the basis of many modern approaches to other tasks (like event clustering and summarisation),\nbut recall on them is a real problem in noisy text - even among annotators. This drop tends to be due to novel entities and surface forms.\nTake for example the tweet \u201cso.. kktny in 30 mins?\u201d - even human experts find entity kktny hard to detect and resolve.\nThis task will evaluate the ability to detect and classify novel, emerging, singleton named entities in noisy text.\n\nThe goal of this task is to provide a definition of emerging and of rare entities, and based on that, also datasets for detecting these entities.\n", "citation": "@inproceedings{derczynski-etal-2017-results,\n title = \"Results of the {WNUT}2017 Shared Task on Novel and Emerging Entity Recognition\",\n author = \"Derczynski, Leon and\n Nichols, Eric and\n van Erp, Marieke and\n Limsopatham, Nut\",\n booktitle = \"Proceedings of the 3rd Workshop on Noisy User-generated Text\",\n month = sep,\n year = \"2017\",\n address = \"Copenhagen, Denmark\",\n publisher = \"Association for Computational Linguistics\",\n url = \"https://www.aclweb.org/anthology/W17-4418\",\n doi = \"10.18653/v1/W17-4418\",\n pages = \"140--147\",\n abstract = \"This shared task focuses on identifying unusual, previously-unseen entities in the context of emerging discussions.\n Named entities form the basis of many modern approaches to other tasks (like event clustering and summarization),\n but recall on them is a real problem in noisy text - even among annotators.\n This drop tends to be due to novel entities and surface forms.\n Take for example the tweet {``}so.. kktny in 30 mins?!{''} {--} even human experts find the entity {`}kktny{'}\n hard to detect and resolve. The goal of this task is to provide a definition of emerging and of rare entities,\n and based on that, also datasets for detecting these entities. The task as described in this paper evaluated the\n ability of participating entries to detect and classify novel and emerging named entities in noisy text.\",\n}\n", "homepage": "http://noisy-text.github.io/2017/emerging-rare-entities.html", "license": "", "features": {"id": {"dtype": "string", "id": null, "_type": "Value"}, "tokens": {"feature": {"dtype": "string", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}, "labels": {"feature": {"dtype": "string", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}}, "supervised_keys": null, "builder_name": "wnut_17", "config_name": "wnut_17", "version": {"version_str": "1.0.0", "description": null, "datasets_version_to_prepare": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"test": {"name": "test", "num_bytes": 351004, "num_examples": 1287, "dataset_name": "wnut_17"}, "train": {"name": "train", "num_bytes": 917587, "num_examples": 3394, "dataset_name": "wnut_17"}, "validation": {"name": "validation", "num_bytes": 223192, "num_examples": 1009, "dataset_name": "wnut_17"}}, "download_checksums": {"https://raw.githubusercontent.com/leondz/emerging_entities_17/master/wnut17train.conll": {"num_bytes": 493781, "checksum": "731820e13f71af324c6b55a1575ec2ce59fbaa2a0806f8f0400b98d56cd6a7a5"}, "https://raw.githubusercontent.com/leondz/emerging_entities_17/master/emerging.dev.conll": {"num_bytes": 114749, "checksum": "e053b752b8155113ca66e7db08af5f2f5f43ab993694e4774f1ec5bad42312d8"}, "https://raw.githubusercontent.com/leondz/emerging_entities_17/master/emerging.test.annotated": {"num_bytes": 192425, "checksum": "2aa79b764e56ec9264a1b30fdd9b70195bd00ff400b62edd8f399d5f13c178f0"}}, "download_size": 800955, "dataset_size": 1491783, "size_in_bytes": 2292738}}
|
dummy/wnut_17/1.0.0/dummy_data.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:c7d6728b17fbc087bdd3825a08c61501697ccf7d9b78a164a1c601b4e0399598
|
3 |
+
size 1637
|
wnut_17.py
ADDED
@@ -0,0 +1,157 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# coding=utf-8
|
2 |
+
# Copyright 2020 HuggingFace Datasets Authors.
|
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 |
+
|
16 |
+
# Lint as: python3
|
17 |
+
"""The WNUT 17 Emerging Entities Dataset."""
|
18 |
+
|
19 |
+
from __future__ import absolute_import, division, print_function
|
20 |
+
|
21 |
+
import logging
|
22 |
+
|
23 |
+
import datasets
|
24 |
+
|
25 |
+
|
26 |
+
_CITATION = """\
|
27 |
+
@inproceedings{derczynski-etal-2017-results,
|
28 |
+
title = "Results of the {WNUT}2017 Shared Task on Novel and Emerging Entity Recognition",
|
29 |
+
author = "Derczynski, Leon and
|
30 |
+
Nichols, Eric and
|
31 |
+
van Erp, Marieke and
|
32 |
+
Limsopatham, Nut",
|
33 |
+
booktitle = "Proceedings of the 3rd Workshop on Noisy User-generated Text",
|
34 |
+
month = sep,
|
35 |
+
year = "2017",
|
36 |
+
address = "Copenhagen, Denmark",
|
37 |
+
publisher = "Association for Computational Linguistics",
|
38 |
+
url = "https://www.aclweb.org/anthology/W17-4418",
|
39 |
+
doi = "10.18653/v1/W17-4418",
|
40 |
+
pages = "140--147",
|
41 |
+
abstract = "This shared task focuses on identifying unusual, previously-unseen entities in the context of emerging discussions.
|
42 |
+
Named entities form the basis of many modern approaches to other tasks (like event clustering and summarization),
|
43 |
+
but recall on them is a real problem in noisy text - even among annotators.
|
44 |
+
This drop tends to be due to novel entities and surface forms.
|
45 |
+
Take for example the tweet {``}so.. kktny in 30 mins?!{''} {--} even human experts find the entity {`}kktny{'}
|
46 |
+
hard to detect and resolve. The goal of this task is to provide a definition of emerging and of rare entities,
|
47 |
+
and based on that, also datasets for detecting these entities. The task as described in this paper evaluated the
|
48 |
+
ability of participating entries to detect and classify novel and emerging named entities in noisy text.",
|
49 |
+
}
|
50 |
+
"""
|
51 |
+
|
52 |
+
_DESCRIPTION = """\
|
53 |
+
WNUT 17: Emerging and Rare entity recognition
|
54 |
+
|
55 |
+
This shared task focuses on identifying unusual, previously-unseen entities in the context of emerging discussions.
|
56 |
+
Named entities form the basis of many modern approaches to other tasks (like event clustering and summarisation),
|
57 |
+
but recall on them is a real problem in noisy text - even among annotators. This drop tends to be due to novel entities and surface forms.
|
58 |
+
Take for example the tweet “so.. kktny in 30 mins?” - even human experts find entity kktny hard to detect and resolve.
|
59 |
+
This task will evaluate the ability to detect and classify novel, emerging, singleton named entities in noisy text.
|
60 |
+
|
61 |
+
The goal of this task is to provide a definition of emerging and of rare entities, and based on that, also datasets for detecting these entities.
|
62 |
+
"""
|
63 |
+
|
64 |
+
_URL = "https://raw.githubusercontent.com/leondz/emerging_entities_17/master/"
|
65 |
+
_TRAINING_FILE = "wnut17train.conll"
|
66 |
+
_DEV_FILE = "emerging.dev.conll"
|
67 |
+
_TEST_FILE = "emerging.test.annotated"
|
68 |
+
|
69 |
+
|
70 |
+
class WNUT_17Config(datasets.BuilderConfig):
|
71 |
+
"""The WNUT 17 Emerging Entities Dataset."""
|
72 |
+
|
73 |
+
def __init__(self, **kwargs):
|
74 |
+
"""BuilderConfig for WNUT 17.
|
75 |
+
|
76 |
+
Args:
|
77 |
+
**kwargs: keyword arguments forwarded to super.
|
78 |
+
"""
|
79 |
+
super(WNUT_17Config, self).__init__(**kwargs)
|
80 |
+
|
81 |
+
|
82 |
+
class WNUT_17(datasets.GeneratorBasedBuilder):
|
83 |
+
"""The WNUT 17 Emerging Entities Dataset."""
|
84 |
+
|
85 |
+
BUILDER_CONFIGS = [
|
86 |
+
WNUT_17Config(
|
87 |
+
name="wnut_17", version=datasets.Version("1.0.0"), description="The WNUT 17 Emerging Entities Dataset"
|
88 |
+
),
|
89 |
+
]
|
90 |
+
|
91 |
+
def _info(self):
|
92 |
+
return datasets.DatasetInfo(
|
93 |
+
description=_DESCRIPTION,
|
94 |
+
features=datasets.Features(
|
95 |
+
{
|
96 |
+
"id": datasets.Value("string"),
|
97 |
+
"tokens": datasets.Sequence(datasets.Value("string")),
|
98 |
+
"labels": datasets.Sequence(datasets.Value("string")),
|
99 |
+
}
|
100 |
+
),
|
101 |
+
supervised_keys=None,
|
102 |
+
homepage="http://noisy-text.github.io/2017/emerging-rare-entities.html",
|
103 |
+
citation=_CITATION,
|
104 |
+
)
|
105 |
+
|
106 |
+
def _split_generators(self, dl_manager):
|
107 |
+
"""Returns SplitGenerators."""
|
108 |
+
urls_to_download = {
|
109 |
+
"train": f"{_URL}{_TRAINING_FILE}",
|
110 |
+
"dev": f"{_URL}{_DEV_FILE}",
|
111 |
+
"test": f"{_URL}{_TEST_FILE}",
|
112 |
+
}
|
113 |
+
downloaded_files = dl_manager.download_and_extract(urls_to_download)
|
114 |
+
|
115 |
+
return [
|
116 |
+
datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": downloaded_files["train"]}),
|
117 |
+
datasets.SplitGenerator(name=datasets.Split.VALIDATION, gen_kwargs={"filepath": downloaded_files["dev"]}),
|
118 |
+
datasets.SplitGenerator(name=datasets.Split.TEST, gen_kwargs={"filepath": downloaded_files["test"]}),
|
119 |
+
]
|
120 |
+
|
121 |
+
def _generate_examples(self, filepath):
|
122 |
+
logging.info("⏳ Generating examples from = %s", filepath)
|
123 |
+
with open(filepath, encoding="utf-8") as f:
|
124 |
+
current_tokens = []
|
125 |
+
current_labels = []
|
126 |
+
sentence_counter = 0
|
127 |
+
for row in f:
|
128 |
+
row = row.rstrip()
|
129 |
+
if row:
|
130 |
+
token, label = row.split("\t")
|
131 |
+
current_tokens.append(token)
|
132 |
+
current_labels.append(label)
|
133 |
+
else:
|
134 |
+
# New sentence
|
135 |
+
if not current_tokens:
|
136 |
+
# Consecutive empty lines will cause empty sentences
|
137 |
+
continue
|
138 |
+
assert len(current_tokens) == len(current_labels), "💔 between len of tokens & labels"
|
139 |
+
sentence = (
|
140 |
+
sentence_counter,
|
141 |
+
{
|
142 |
+
"id": str(sentence_counter),
|
143 |
+
"tokens": current_tokens,
|
144 |
+
"labels": current_labels,
|
145 |
+
},
|
146 |
+
)
|
147 |
+
sentence_counter += 1
|
148 |
+
current_tokens = []
|
149 |
+
current_labels = []
|
150 |
+
yield sentence
|
151 |
+
# Don't forget last sentence in dataset 🧐
|
152 |
+
if current_tokens:
|
153 |
+
yield sentence_counter, {
|
154 |
+
"id": str(sentence_counter),
|
155 |
+
"tokens": current_tokens,
|
156 |
+
"labels": current_labels,
|
157 |
+
}
|