Datasets:
Tasks:
Token Classification
Modalities:
Text
Formats:
parquet
Sub-tasks:
named-entity-recognition
Languages:
Romanian
Size:
10K - 100K
ArXiv:
License:
Convert dataset to Parquet (#4)
Browse files- Convert dataset to Parquet (8e4f9bdcb7ba90a088b245cdc990832acb36fcd3)
- Delete loading script (e8237fbaae95a1676de515a2932f10b66cb36784)
- README.md +16 -6
- ronec.py +0 -161
- ronec/test-00000-of-00001.parquet +3 -0
- ronec/train-00000-of-00001.parquet +3 -0
- ronec/validation-00000-of-00001.parquet +3 -0
README.md
CHANGED
|
@@ -21,6 +21,7 @@ task_ids:
|
|
| 21 |
paperswithcode_id: ronec
|
| 22 |
pretty_name: RONEC
|
| 23 |
dataset_info:
|
|
|
|
| 24 |
features:
|
| 25 |
- name: id
|
| 26 |
dtype: int32
|
|
@@ -65,19 +66,28 @@ dataset_info:
|
|
| 65 |
'28': I-ORDINAL
|
| 66 |
'29': B-FACILITY
|
| 67 |
'30': I-FACILITY
|
| 68 |
-
config_name: ronec
|
| 69 |
splits:
|
| 70 |
- name: train
|
| 71 |
-
num_bytes:
|
| 72 |
num_examples: 9000
|
| 73 |
- name: validation
|
| 74 |
-
num_bytes:
|
| 75 |
num_examples: 1330
|
| 76 |
- name: test
|
| 77 |
-
num_bytes:
|
| 78 |
num_examples: 2000
|
| 79 |
-
download_size:
|
| 80 |
-
dataset_size:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 81 |
---
|
| 82 |
|
| 83 |
# Dataset Card for RONEC
|
|
|
|
| 21 |
paperswithcode_id: ronec
|
| 22 |
pretty_name: RONEC
|
| 23 |
dataset_info:
|
| 24 |
+
config_name: ronec
|
| 25 |
features:
|
| 26 |
- name: id
|
| 27 |
dtype: int32
|
|
|
|
| 66 |
'28': I-ORDINAL
|
| 67 |
'29': B-FACILITY
|
| 68 |
'30': I-FACILITY
|
|
|
|
| 69 |
splits:
|
| 70 |
- name: train
|
| 71 |
+
num_bytes: 8701559
|
| 72 |
num_examples: 9000
|
| 73 |
- name: validation
|
| 74 |
+
num_bytes: 1266470
|
| 75 |
num_examples: 1330
|
| 76 |
- name: test
|
| 77 |
+
num_bytes: 1902205
|
| 78 |
num_examples: 2000
|
| 79 |
+
download_size: 2935846
|
| 80 |
+
dataset_size: 11870234
|
| 81 |
+
configs:
|
| 82 |
+
- config_name: ronec
|
| 83 |
+
data_files:
|
| 84 |
+
- split: train
|
| 85 |
+
path: ronec/train-*
|
| 86 |
+
- split: validation
|
| 87 |
+
path: ronec/validation-*
|
| 88 |
+
- split: test
|
| 89 |
+
path: ronec/test-*
|
| 90 |
+
default: true
|
| 91 |
---
|
| 92 |
|
| 93 |
# Dataset Card for RONEC
|
ronec.py
DELETED
|
@@ -1,161 +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 |
-
|
| 16 |
-
import json
|
| 17 |
-
|
| 18 |
-
import datasets
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
logger = datasets.logging.get_logger(__name__)
|
| 22 |
-
|
| 23 |
-
# Find for instance the citation on arxiv or on the dataset repo/website
|
| 24 |
-
_CITATION = """\
|
| 25 |
-
@article{dumitrescu2019introducing,
|
| 26 |
-
title={Introducing RONEC--the Romanian Named Entity Corpus},
|
| 27 |
-
author={Dumitrescu, Stefan Daniel and Avram, Andrei-Marius},
|
| 28 |
-
journal={arXiv preprint arXiv:1909.01247},
|
| 29 |
-
year={2019}
|
| 30 |
-
}
|
| 31 |
-
"""
|
| 32 |
-
|
| 33 |
-
# You can copy an official description
|
| 34 |
-
_DESCRIPTION = """\
|
| 35 |
-
RONEC - the Romanian Named Entity Corpus, at version 2.0, holds 12330 sentences with over 0.5M tokens, annotated with 15 classes, to a total of 80.283 distinctly annotated entities. It is used for named entity recognition and represents the largest Romanian NER corpus to date.
|
| 36 |
-
"""
|
| 37 |
-
|
| 38 |
-
_HOMEPAGE = "https://github.com/dumitrescustefan/ronec"
|
| 39 |
-
|
| 40 |
-
_LICENSE = "MIT License"
|
| 41 |
-
|
| 42 |
-
# The HuggingFace dataset library don't host the datasets but only point to the original files
|
| 43 |
-
# This can be an arbitrary nested dict/list of URLs (see below in `_split_generators` method)
|
| 44 |
-
_URL = "https://raw.githubusercontent.com/dumitrescustefan/ronec/master/data/"
|
| 45 |
-
_TRAINING_FILE = "train.json"
|
| 46 |
-
_DEV_FILE = "valid.json"
|
| 47 |
-
_TEST_FILE = "test.json"
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
class RONECConfig(datasets.BuilderConfig):
|
| 51 |
-
"""BuilderConfig for RONEC dataset"""
|
| 52 |
-
|
| 53 |
-
def __init__(self, **kwargs):
|
| 54 |
-
super(RONECConfig, self).__init__(**kwargs)
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
class RONEC(datasets.GeneratorBasedBuilder):
|
| 58 |
-
"""RONEC dataset"""
|
| 59 |
-
|
| 60 |
-
VERSION = datasets.Version("2.0.0")
|
| 61 |
-
BUILDER_CONFIGS = [
|
| 62 |
-
RONECConfig(name="ronec", version=VERSION, description="RONEC dataset"),
|
| 63 |
-
]
|
| 64 |
-
|
| 65 |
-
def _info(self):
|
| 66 |
-
features = datasets.Features(
|
| 67 |
-
{
|
| 68 |
-
"id": datasets.Value("int32"),
|
| 69 |
-
"tokens": datasets.Sequence(datasets.Value("string")),
|
| 70 |
-
"ner_ids": datasets.Sequence(datasets.Value("int32")),
|
| 71 |
-
"space_after": datasets.Sequence(datasets.Value("bool")),
|
| 72 |
-
"ner_tags": datasets.Sequence(
|
| 73 |
-
datasets.features.ClassLabel(
|
| 74 |
-
names=[
|
| 75 |
-
"O",
|
| 76 |
-
"B-PERSON",
|
| 77 |
-
"I-PERSON",
|
| 78 |
-
"B-ORG",
|
| 79 |
-
"I-ORG",
|
| 80 |
-
"B-GPE",
|
| 81 |
-
"I-GPE",
|
| 82 |
-
"B-LOC",
|
| 83 |
-
"I-LOC",
|
| 84 |
-
"B-NAT_REL_POL",
|
| 85 |
-
"I-NAT_REL_POL",
|
| 86 |
-
"B-EVENT",
|
| 87 |
-
"I-EVENT",
|
| 88 |
-
"B-LANGUAGE",
|
| 89 |
-
"I-LANGUAGE",
|
| 90 |
-
"B-WORK_OF_ART",
|
| 91 |
-
"I-WORK_OF_ART",
|
| 92 |
-
"B-DATETIME",
|
| 93 |
-
"I-DATETIME",
|
| 94 |
-
"B-PERIOD",
|
| 95 |
-
"I-PERIOD",
|
| 96 |
-
"B-MONEY",
|
| 97 |
-
"I-MONEY",
|
| 98 |
-
"B-QUANTITY",
|
| 99 |
-
"I-QUANTITY",
|
| 100 |
-
"B-NUMERIC",
|
| 101 |
-
"I-NUMERIC",
|
| 102 |
-
"B-ORDINAL",
|
| 103 |
-
"I-ORDINAL",
|
| 104 |
-
"B-FACILITY",
|
| 105 |
-
"I-FACILITY",
|
| 106 |
-
]
|
| 107 |
-
)
|
| 108 |
-
),
|
| 109 |
-
}
|
| 110 |
-
)
|
| 111 |
-
|
| 112 |
-
return datasets.DatasetInfo(
|
| 113 |
-
# This is the description that will appear on the datasets page.
|
| 114 |
-
description=_DESCRIPTION,
|
| 115 |
-
# This defines the different columns of the dataset and their types
|
| 116 |
-
features=features, # Here we define them above because they are different between the two configurations
|
| 117 |
-
# If there's a common (input, target) tuple from the features,
|
| 118 |
-
# specify them here. They'll be used if as_supervised=True in
|
| 119 |
-
# builder.as_dataset.
|
| 120 |
-
supervised_keys=None,
|
| 121 |
-
# Homepage of the dataset for documentation
|
| 122 |
-
homepage=_HOMEPAGE,
|
| 123 |
-
# License for the dataset if available
|
| 124 |
-
license=_LICENSE,
|
| 125 |
-
# Citation for the dataset
|
| 126 |
-
citation=_CITATION,
|
| 127 |
-
)
|
| 128 |
-
|
| 129 |
-
def _split_generators(self, dl_manager):
|
| 130 |
-
"""Returns SplitGenerators."""
|
| 131 |
-
|
| 132 |
-
urls_to_download = {"train": _URL + _TRAINING_FILE, "dev": _URL + _DEV_FILE, "test": _URL + _TEST_FILE}
|
| 133 |
-
|
| 134 |
-
downloaded_files = dl_manager.download(urls_to_download)
|
| 135 |
-
|
| 136 |
-
return [
|
| 137 |
-
datasets.SplitGenerator(
|
| 138 |
-
name=datasets.Split.TRAIN,
|
| 139 |
-
# These kwargs will be passed to _generate_examples
|
| 140 |
-
gen_kwargs={"filepath": downloaded_files["train"]},
|
| 141 |
-
),
|
| 142 |
-
datasets.SplitGenerator(
|
| 143 |
-
name=datasets.Split.VALIDATION,
|
| 144 |
-
# These kwargs will be passed to _generate_examples
|
| 145 |
-
gen_kwargs={"filepath": downloaded_files["dev"]},
|
| 146 |
-
),
|
| 147 |
-
datasets.SplitGenerator(
|
| 148 |
-
name=datasets.Split.TEST,
|
| 149 |
-
# These kwargs will be passed to _generate_examples
|
| 150 |
-
gen_kwargs={"filepath": downloaded_files["test"]},
|
| 151 |
-
),
|
| 152 |
-
]
|
| 153 |
-
|
| 154 |
-
def _generate_examples(self, filepath):
|
| 155 |
-
"""Yields examples."""
|
| 156 |
-
|
| 157 |
-
logger.info("⏳ Generating examples from = %s", filepath)
|
| 158 |
-
with open(filepath, "r", encoding="utf-8") as f:
|
| 159 |
-
data = json.load(f)
|
| 160 |
-
for instance in data:
|
| 161 |
-
yield instance["id"], instance
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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.github.com/spec/v1
|
| 2 |
+
oid sha256:e4bcf1108efc2fbdadabd995cb767c4a23fc6cbff9d77c65a3d08762ffd9d332
|
| 3 |
+
size 473051
|
ronec/train-00000-of-00001.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ab7c6430dd3432da23b40fdbc421d2847c4e9d4e6111fa0d3ed6c2a085c3764e
|
| 3 |
+
size 2140208
|
ronec/validation-00000-of-00001.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:76bcf692b9396a48d57153a594bafbdb7cea4756680926d9a37cbd680777a0d9
|
| 3 |
+
size 322587
|