Datasets:
Tasks:
Token Classification
Modalities:
Text
Sub-tasks:
named-entity-recognition
Languages:
English
Size:
10K - 100K
License:
Convert dataset to Parquet
#2
by
fleonce
- opened
- README.md +29 -0
- dataset/label.json +0 -1
- dataset/test.json +0 -0
- dataset/train00.json +0 -0
- dataset/train01.json +0 -0
- dataset/train02.json +0 -0
- dataset/train03.json +0 -0
- dataset/valid.json +0 -0
- ontonotes5.py +0 -84
- ontonotes5/test-00000-of-00001.parquet +3 -0
- ontonotes5/train-00000-of-00001.parquet +3 -0
- ontonotes5/validation-00000-of-00001.parquet +3 -0
README.md
CHANGED
|
@@ -12,6 +12,35 @@ task_categories:
|
|
| 12 |
task_ids:
|
| 13 |
- named-entity-recognition
|
| 14 |
pretty_name: Ontonotes5
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
---
|
| 16 |
|
| 17 |
# Dataset Card for "tner/ontonotes5"
|
|
|
|
| 12 |
task_ids:
|
| 13 |
- named-entity-recognition
|
| 14 |
pretty_name: Ontonotes5
|
| 15 |
+
configs:
|
| 16 |
+
- config_name: ontonotes5
|
| 17 |
+
data_files:
|
| 18 |
+
- split: train
|
| 19 |
+
path: ontonotes5/train-*
|
| 20 |
+
- split: validation
|
| 21 |
+
path: ontonotes5/validation-*
|
| 22 |
+
- split: test
|
| 23 |
+
path: ontonotes5/test-*
|
| 24 |
+
default: true
|
| 25 |
+
dataset_info:
|
| 26 |
+
config_name: ontonotes5
|
| 27 |
+
features:
|
| 28 |
+
- name: tokens
|
| 29 |
+
sequence: string
|
| 30 |
+
- name: tags
|
| 31 |
+
sequence: int32
|
| 32 |
+
splits:
|
| 33 |
+
- name: train
|
| 34 |
+
num_bytes: 13828647
|
| 35 |
+
num_examples: 59924
|
| 36 |
+
- name: validation
|
| 37 |
+
num_bytes: 1874112
|
| 38 |
+
num_examples: 8528
|
| 39 |
+
- name: test
|
| 40 |
+
num_bytes: 1934244
|
| 41 |
+
num_examples: 8262
|
| 42 |
+
download_size: 4700778
|
| 43 |
+
dataset_size: 17637003
|
| 44 |
---
|
| 45 |
|
| 46 |
# Dataset Card for "tner/ontonotes5"
|
dataset/label.json
DELETED
|
@@ -1 +0,0 @@
|
|
| 1 |
-
{"O": 0, "B-CARDINAL": 1, "B-DATE": 2, "I-DATE": 3, "B-PERSON": 4, "I-PERSON": 5, "B-NORP": 6, "B-GPE": 7, "I-GPE": 8, "B-LAW": 9, "I-LAW": 10, "B-ORG": 11, "I-ORG": 12, "B-PERCENT": 13, "I-PERCENT": 14, "B-ORDINAL": 15, "B-MONEY": 16, "I-MONEY": 17, "B-WORK_OF_ART": 18, "I-WORK_OF_ART": 19, "B-FAC": 20, "B-TIME": 21, "I-CARDINAL": 22, "B-LOC": 23, "B-QUANTITY": 24, "I-QUANTITY": 25, "I-NORP": 26, "I-LOC": 27, "B-PRODUCT": 28, "I-TIME": 29, "B-EVENT": 30, "I-EVENT": 31, "I-FAC": 32, "B-LANGUAGE": 33, "I-PRODUCT": 34, "I-ORDINAL": 35, "I-LANGUAGE": 36}
|
|
|
|
|
|
dataset/test.json
DELETED
|
The diff for this file is too large to render.
See raw diff
|
|
|
dataset/train00.json
DELETED
|
The diff for this file is too large to render.
See raw diff
|
|
|
dataset/train01.json
DELETED
|
The diff for this file is too large to render.
See raw diff
|
|
|
dataset/train02.json
DELETED
|
The diff for this file is too large to render.
See raw diff
|
|
|
dataset/train03.json
DELETED
|
The diff for this file is too large to render.
See raw diff
|
|
|
dataset/valid.json
DELETED
|
The diff for this file is too large to render.
See raw diff
|
|
|
ontonotes5.py
DELETED
|
@@ -1,84 +0,0 @@
|
|
| 1 |
-
""" NER dataset compiled by T-NER library https://github.com/asahi417/tner/tree/master/tner """
|
| 2 |
-
import json
|
| 3 |
-
from itertools import chain
|
| 4 |
-
import datasets
|
| 5 |
-
|
| 6 |
-
logger = datasets.logging.get_logger(__name__)
|
| 7 |
-
_DESCRIPTION = """[ontonotes5 NER dataset](https://aclanthology.org/N06-2015/)"""
|
| 8 |
-
_NAME = "ontonotes5"
|
| 9 |
-
_VERSION = "1.0.0"
|
| 10 |
-
_CITATION = """
|
| 11 |
-
@inproceedings{hovy-etal-2006-ontonotes,
|
| 12 |
-
title = "{O}nto{N}otes: The 90{\%} Solution",
|
| 13 |
-
author = "Hovy, Eduard and
|
| 14 |
-
Marcus, Mitchell and
|
| 15 |
-
Palmer, Martha and
|
| 16 |
-
Ramshaw, Lance and
|
| 17 |
-
Weischedel, Ralph",
|
| 18 |
-
booktitle = "Proceedings of the Human Language Technology Conference of the {NAACL}, Companion Volume: Short Papers",
|
| 19 |
-
month = jun,
|
| 20 |
-
year = "2006",
|
| 21 |
-
address = "New York City, USA",
|
| 22 |
-
publisher = "Association for Computational Linguistics",
|
| 23 |
-
url = "https://aclanthology.org/N06-2015",
|
| 24 |
-
pages = "57--60",
|
| 25 |
-
}
|
| 26 |
-
"""
|
| 27 |
-
|
| 28 |
-
_HOME_PAGE = "https://github.com/asahi417/tner"
|
| 29 |
-
_URL = f'https://huggingface.co/datasets/tner/{_NAME}/raw/main/dataset'
|
| 30 |
-
_URLS = {
|
| 31 |
-
str(datasets.Split.TEST): [f'{_URL}/test.json'],
|
| 32 |
-
str(datasets.Split.TRAIN): [f'{_URL}/train{i:02d}.json' for i in range(4)],
|
| 33 |
-
str(datasets.Split.VALIDATION): [f'{_URL}/valid.json'],
|
| 34 |
-
}
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
class Ontonotes5Config(datasets.BuilderConfig):
|
| 38 |
-
"""BuilderConfig"""
|
| 39 |
-
|
| 40 |
-
def __init__(self, **kwargs):
|
| 41 |
-
"""BuilderConfig.
|
| 42 |
-
|
| 43 |
-
Args:
|
| 44 |
-
**kwargs: keyword arguments forwarded to super.
|
| 45 |
-
"""
|
| 46 |
-
super(Ontonotes5Config, self).__init__(**kwargs)
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
class Ontonotes5(datasets.GeneratorBasedBuilder):
|
| 50 |
-
"""Dataset."""
|
| 51 |
-
|
| 52 |
-
BUILDER_CONFIGS = [
|
| 53 |
-
Ontonotes5Config(name=_NAME, version=datasets.Version(_VERSION), description=_DESCRIPTION),
|
| 54 |
-
]
|
| 55 |
-
|
| 56 |
-
def _split_generators(self, dl_manager):
|
| 57 |
-
downloaded_file = dl_manager.download_and_extract(_URLS)
|
| 58 |
-
return [datasets.SplitGenerator(name=i, gen_kwargs={"filepaths": downloaded_file[str(i)]})
|
| 59 |
-
for i in [datasets.Split.TRAIN, datasets.Split.VALIDATION, datasets.Split.TEST]]
|
| 60 |
-
|
| 61 |
-
def _generate_examples(self, filepaths):
|
| 62 |
-
_key = 0
|
| 63 |
-
for filepath in filepaths:
|
| 64 |
-
logger.info(f"generating examples from = {filepath}")
|
| 65 |
-
with open(filepath, encoding="utf-8") as f:
|
| 66 |
-
_list = [i for i in f.read().split('\n') if len(i) > 0]
|
| 67 |
-
for i in _list:
|
| 68 |
-
data = json.loads(i)
|
| 69 |
-
yield _key, data
|
| 70 |
-
_key += 1
|
| 71 |
-
|
| 72 |
-
def _info(self):
|
| 73 |
-
return datasets.DatasetInfo(
|
| 74 |
-
description=_DESCRIPTION,
|
| 75 |
-
features=datasets.Features(
|
| 76 |
-
{
|
| 77 |
-
"tokens": datasets.Sequence(datasets.Value("string")),
|
| 78 |
-
"tags": datasets.Sequence(datasets.Value("int32")),
|
| 79 |
-
}
|
| 80 |
-
),
|
| 81 |
-
supervised_keys=None,
|
| 82 |
-
homepage=_HOME_PAGE,
|
| 83 |
-
citation=_CITATION,
|
| 84 |
-
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ontonotes5/test-00000-of-00001.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bd65f4a93eee76f1949c50a8d68e8f1c2b40840eff333cca8e08b8bfb98f5560
|
| 3 |
+
size 516218
|
ontonotes5/train-00000-of-00001.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:69fc972b2286c9238837abe95e1c51c6e37b18901ba4364ae79b4521cf02e5c8
|
| 3 |
+
size 3670645
|
ontonotes5/validation-00000-of-00001.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e51eaffa0ee4e1783bf2c7dae7c25ca9a7c9e478aea36695cd7ae415a410abaf
|
| 3 |
+
size 513915
|