Datasets:
Commit
•
0ff9c86
1
Parent(s):
2ec4bf3
Convert dataset to Parquet (#3)
Browse files- Convert dataset to Parquet (a1f70daa881f43ecbbf1c954c4880c7400c9e7d8)
- Delete loading script (e095b3216766c12cc191808162a8daaf1124ca26)
- Delete legacy dataset_infos.json (fd9f31e671f0abf23410816026042e4bec2a0283)
- README.md +14 -5
- assin2.py +0 -125
- data/test-00000-of-00001.parquet +3 -0
- data/train-00000-of-00001.parquet +3 -0
- data/validation-00000-of-00001.parquet +3 -0
- dataset_infos.json +0 -1
README.md
CHANGED
@@ -39,16 +39,25 @@ dataset_info:
|
|
39 |
'1': ENTAILMENT
|
40 |
splits:
|
41 |
- name: train
|
42 |
-
num_bytes:
|
43 |
num_examples: 6500
|
44 |
- name: test
|
45 |
-
num_bytes:
|
46 |
num_examples: 2448
|
47 |
- name: validation
|
48 |
-
num_bytes:
|
49 |
num_examples: 500
|
50 |
-
download_size:
|
51 |
-
dataset_size:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
---
|
53 |
|
54 |
# Dataset Card for ASSIN 2
|
|
|
39 |
'1': ENTAILMENT
|
40 |
splits:
|
41 |
- name: train
|
42 |
+
num_bytes: 863995
|
43 |
num_examples: 6500
|
44 |
- name: test
|
45 |
+
num_bytes: 339266
|
46 |
num_examples: 2448
|
47 |
- name: validation
|
48 |
+
num_bytes: 66824
|
49 |
num_examples: 500
|
50 |
+
download_size: 566733
|
51 |
+
dataset_size: 1270085
|
52 |
+
configs:
|
53 |
+
- config_name: default
|
54 |
+
data_files:
|
55 |
+
- split: train
|
56 |
+
path: data/train-*
|
57 |
+
- split: test
|
58 |
+
path: data/test-*
|
59 |
+
- split: validation
|
60 |
+
path: data/validation-*
|
61 |
---
|
62 |
|
63 |
# Dataset Card for ASSIN 2
|
assin2.py
DELETED
@@ -1,125 +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 |
-
"""ASSIN 2 dataset."""
|
16 |
-
|
17 |
-
|
18 |
-
import xml.etree.ElementTree as ET
|
19 |
-
|
20 |
-
import datasets
|
21 |
-
|
22 |
-
|
23 |
-
_CITATION = """
|
24 |
-
@inproceedings{real2020assin,
|
25 |
-
title={The assin 2 shared task: a quick overview},
|
26 |
-
author={Real, Livy and Fonseca, Erick and Oliveira, Hugo Goncalo},
|
27 |
-
booktitle={International Conference on Computational Processing of the Portuguese Language},
|
28 |
-
pages={406--412},
|
29 |
-
year={2020},
|
30 |
-
organization={Springer}
|
31 |
-
}
|
32 |
-
"""
|
33 |
-
|
34 |
-
_DESCRIPTION = """
|
35 |
-
The ASSIN 2 corpus is composed of rather simple sentences. Following the procedures of SemEval 2014 Task 1.
|
36 |
-
The training and validation data are composed, respectively, of 6,500 and 500 sentence pairs in Brazilian Portuguese,
|
37 |
-
annotated for entailment and semantic similarity. Semantic similarity values range from 1 to 5, and text entailment
|
38 |
-
classes are either entailment or none. The test data are composed of approximately 3,000 sentence pairs with the same
|
39 |
-
annotation. All data were manually annotated.
|
40 |
-
"""
|
41 |
-
|
42 |
-
_HOMEPAGE = "https://sites.google.com/view/assin2"
|
43 |
-
|
44 |
-
_LICENSE = ""
|
45 |
-
|
46 |
-
_URLS = {
|
47 |
-
"train": "https://github.com/ruanchaves/assin/raw/master/sources/assin2-train-only.xml",
|
48 |
-
"dev": "https://github.com/ruanchaves/assin/raw/master/sources/assin2-dev.xml",
|
49 |
-
"test": "https://github.com/ruanchaves/assin/raw/master/sources/assin2-test.xml",
|
50 |
-
}
|
51 |
-
|
52 |
-
|
53 |
-
class Assin2(datasets.GeneratorBasedBuilder):
|
54 |
-
"""ASSIN 2 dataset."""
|
55 |
-
|
56 |
-
VERSION = datasets.Version("1.0.0")
|
57 |
-
|
58 |
-
def _info(self):
|
59 |
-
features = datasets.Features(
|
60 |
-
{
|
61 |
-
"sentence_pair_id": datasets.Value("int64"),
|
62 |
-
"premise": datasets.Value("string"),
|
63 |
-
"hypothesis": datasets.Value("string"),
|
64 |
-
"relatedness_score": datasets.Value("float32"),
|
65 |
-
"entailment_judgment": datasets.features.ClassLabel(names=["NONE", "ENTAILMENT"]),
|
66 |
-
}
|
67 |
-
)
|
68 |
-
return datasets.DatasetInfo(
|
69 |
-
description=_DESCRIPTION,
|
70 |
-
features=features,
|
71 |
-
supervised_keys=None,
|
72 |
-
homepage=_HOMEPAGE,
|
73 |
-
license=_LICENSE,
|
74 |
-
citation=_CITATION,
|
75 |
-
)
|
76 |
-
|
77 |
-
def _split_generators(self, dl_manager):
|
78 |
-
"""Returns SplitGenerators."""
|
79 |
-
data_dir = dl_manager.download(_URLS)
|
80 |
-
|
81 |
-
return [
|
82 |
-
datasets.SplitGenerator(
|
83 |
-
name=datasets.Split.TRAIN,
|
84 |
-
gen_kwargs={
|
85 |
-
"filepath": data_dir["train"],
|
86 |
-
"split": "train",
|
87 |
-
},
|
88 |
-
),
|
89 |
-
datasets.SplitGenerator(
|
90 |
-
name=datasets.Split.TEST,
|
91 |
-
gen_kwargs={
|
92 |
-
"filepath": data_dir["test"],
|
93 |
-
"split": "test",
|
94 |
-
},
|
95 |
-
),
|
96 |
-
datasets.SplitGenerator(
|
97 |
-
name=datasets.Split.VALIDATION,
|
98 |
-
gen_kwargs={
|
99 |
-
"filepath": data_dir["dev"],
|
100 |
-
"split": "dev",
|
101 |
-
},
|
102 |
-
),
|
103 |
-
]
|
104 |
-
|
105 |
-
def _generate_examples(self, filepath, split):
|
106 |
-
"""Yields examples."""
|
107 |
-
|
108 |
-
id_ = 0
|
109 |
-
|
110 |
-
with open(filepath, "rb") as f:
|
111 |
-
|
112 |
-
tree = ET.parse(f)
|
113 |
-
root = tree.getroot()
|
114 |
-
|
115 |
-
for pair in root:
|
116 |
-
|
117 |
-
yield id_, {
|
118 |
-
"sentence_pair_id": int(pair.attrib.get("id")),
|
119 |
-
"premise": pair.find(".//t").text,
|
120 |
-
"hypothesis": pair.find(".//h").text,
|
121 |
-
"relatedness_score": float(pair.attrib.get("similarity")),
|
122 |
-
"entailment_judgment": pair.attrib.get("entailment").upper(),
|
123 |
-
}
|
124 |
-
|
125 |
-
id_ += 1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
data/test-00000-of-00001.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:7300d08098a74175b75c5be7c04ec06a69a09857f2cf5c6dbaeff59b6fbc2557
|
3 |
+
size 157085
|
data/train-00000-of-00001.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4e30f81122db3074eb23f00a8801c47cda1a2bc4e05eaea799439450e2762f44
|
3 |
+
size 375594
|
data/validation-00000-of-00001.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:76da79e99919d4fed5888b3794e8a89fcb2635507ecd7d94965db11d45f86b33
|
3 |
+
size 34054
|
dataset_infos.json
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
{"default": {"description": "\nThe ASSIN 2 corpus is composed of rather simple sentences. Following the procedures of SemEval 2014 Task 1.\nThe training and validation data are composed, respectively, of 6,500 and 500 sentence pairs in Brazilian Portuguese,\nannotated for entailment and semantic similarity. Semantic similarity values range from 1 to 5, and text entailment\nclasses are either entailment or none. The test data are composed of approximately 3,000 sentence pairs with the same\nannotation. All data were manually annotated.\n", "citation": "\n@inproceedings{real2020assin,\n title={The assin 2 shared task: a quick overview},\n author={Real, Livy and Fonseca, Erick and Oliveira, Hugo Goncalo},\n booktitle={International Conference on Computational Processing of the Portuguese Language},\n pages={406--412},\n year={2020},\n organization={Springer}\n}\n", "homepage": "https://sites.google.com/view/assin2", "license": "", "features": {"sentence_pair_id": {"dtype": "int64", "id": null, "_type": "Value"}, "premise": {"dtype": "string", "id": null, "_type": "Value"}, "hypothesis": {"dtype": "string", "id": null, "_type": "Value"}, "relatedness_score": {"dtype": "float32", "id": null, "_type": "Value"}, "entailment_judgment": {"num_classes": 2, "names": ["NONE", "ENTAILMENT"], "id": null, "_type": "ClassLabel"}}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": "assin2", "config_name": "default", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 864816, "num_examples": 6500, "dataset_name": "assin2"}, "test": {"name": "test", "num_bytes": 339580, "num_examples": 2448, "dataset_name": "assin2"}, "validation": {"name": "validation", "num_bytes": 66895, "num_examples": 500, "dataset_name": "assin2"}}, "download_checksums": {"https://github.com/ruanchaves/assin/raw/master/sources/assin2-train-only.xml": {"num_bytes": 1505084, "checksum": "0909e113e30f53a64ee7ef28b3287e78790ca06e45011caf07d38777877e367f"}, "https://github.com/ruanchaves/assin/raw/master/sources/assin2-dev.xml": {"num_bytes": 115698, "checksum": "b6639e7fb562325fe847b249d96f14d7d4fab0d5fe5aa542c19089d0d0c9081c"}, "https://github.com/ruanchaves/assin/raw/master/sources/assin2-test.xml": {"num_bytes": 492864, "checksum": "246fbaa0a5f8120b00baee4c9d64bf6f0c6669fbdbcb9fab5563114699f3890c"}}, "download_size": 2113646, "post_processing_size": null, "dataset_size": 1271291, "size_in_bytes": 3384937}}
|
|
|
|