system HF staff commited on
Commit
613436b
0 Parent(s):

Update files from the datasets library (from 1.2.0)

Browse files

Release notes: https://github.com/huggingface/datasets/releases/tag/1.2.0

Files changed (5) hide show
  1. .gitattributes +27 -0
  2. README.md +169 -0
  3. assin2.py +126 -0
  4. dataset_infos.json +1 -0
  5. dummy/1.0.0/dummy_data.zip +3 -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,169 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ annotations_creators:
3
+ - expert-generated
4
+ language_creators:
5
+ - found
6
+ languages:
7
+ - pt
8
+ licenses:
9
+ - unknown
10
+ multilinguality:
11
+ - monolingual
12
+ size_categories:
13
+ - 10K<n<100K
14
+ source_datasets:
15
+ - original
16
+ task_categories:
17
+ - text-classification
18
+ - text-scoring
19
+ task_ids:
20
+ - natural-language-inference
21
+ - semantic-similarity-scoring
22
+ ---
23
+
24
+ # Dataset Card for ASSIN 2
25
+
26
+ ## Table of Contents
27
+ - [Dataset Description](#dataset-description)
28
+ - [Dataset Summary](#dataset-summary)
29
+ - [Supported Tasks](#supported-tasks-and-leaderboards)
30
+ - [Languages](#languages)
31
+ - [Dataset Structure](#dataset-structure)
32
+ - [Data Instances](#data-instances)
33
+ - [Data Fields](#data-fields)
34
+ - [Data Splits](#data-splits)
35
+ - [Dataset Creation](#dataset-creation)
36
+ - [Curation Rationale](#curation-rationale)
37
+ - [Source Data](#source-data)
38
+ - [Annotations](#annotations)
39
+ - [Personal and Sensitive Information](#personal-and-sensitive-information)
40
+ - [Considerations for Using the Data](#considerations-for-using-the-data)
41
+ - [Social Impact of Dataset](#social-impact-of-dataset)
42
+ - [Discussion of Biases](#discussion-of-biases)
43
+ - [Other Known Limitations](#other-known-limitations)
44
+ - [Additional Information](#additional-information)
45
+ - [Dataset Curators](#dataset-curators)
46
+ - [Licensing Information](#licensing-information)
47
+ - [Citation Information](#citation-information)
48
+
49
+ ## Dataset Description
50
+
51
+ - **Homepage:** [ASSIN 2 homepage](https://sites.google.com/view/assin2)
52
+ - **Repository:** [ASSIN 2 repository](https://sites.google.com/view/assin2)
53
+ - **Paper:** [The ASSIN 2 shared task: a quick overview](https://drive.google.com/file/d/1ft1VU6xiVm-N58dfAp6FHWjQ4IvcXgqp/view)
54
+ - **Point of Contact:** [Livy Real](mailto:livyreal@gmail.com)
55
+
56
+ ### Dataset Summary
57
+
58
+ The ASSIN 2 corpus is composed of rather simple sentences. Following the procedures of SemEval 2014 Task 1.
59
+ The training and validation data are composed, respectively, of 6,500 and 500 sentence pairs in Brazilian Portuguese,
60
+ annotated for entailment and semantic similarity. Semantic similarity values range from 1 to 5, and text entailment
61
+ classes are either entailment or none. The test data are composed of approximately 3,000 sentence pairs with the same
62
+ annotation. All data were manually annotated.
63
+
64
+ ### Supported Tasks and Leaderboards
65
+
66
+ [More Information Needed]
67
+
68
+ ### Languages
69
+
70
+ The language supported is Portuguese.
71
+
72
+ ## Dataset Structure
73
+
74
+ ### Data Instances
75
+
76
+ An example from the ASSIN 2 dataset looks as follows:
77
+
78
+ ```
79
+ {
80
+ "entailment_judgment": 1,
81
+ "hypothesis": "Uma criança está segurando uma pistola de água",
82
+ "premise": "Uma criança risonha está segurando uma pistola de água e sendo espirrada com água",
83
+ "relatedness_score": 4.5,
84
+ "sentence_pair_id": 1
85
+ }
86
+ ```
87
+
88
+ ### Data Fields
89
+
90
+ - `sentence_pair_id`: a `int64` feature.
91
+ - `premise`: a `string` feature.
92
+ - `hypothesis`: a `string` feature.
93
+ - `relatedness_score`: a `float32` feature.
94
+ - `entailment_judgment`: a classification label, with possible values including `NONE`, `ENTAILMENT`.
95
+
96
+ ### Data Splits
97
+
98
+ The data is split into train, validation and test set. The split sizes are as follow:
99
+
100
+ | Train | Val | Test |
101
+ | ------ | ----- | ---- |
102
+ | 6500 | 500 | 2448 |
103
+
104
+ ## Dataset Creation
105
+
106
+ ### Curation Rationale
107
+
108
+ [More Information Needed]
109
+
110
+ ### Source Data
111
+
112
+ #### Initial Data Collection and Normalization
113
+
114
+ [More Information Needed]
115
+
116
+ #### Who are the source language producers?
117
+
118
+ [More Information Needed]
119
+
120
+ ### Annotations
121
+
122
+ #### Annotation process
123
+
124
+ [More Information Needed]
125
+
126
+ #### Who are the annotators?
127
+
128
+ [More Information Needed]
129
+
130
+ ### Personal and Sensitive Information
131
+
132
+ [More Information Needed]
133
+
134
+ ## Considerations for Using the Data
135
+
136
+ ### Social Impact of Dataset
137
+
138
+ [More Information Needed]
139
+
140
+ ### Discussion of Biases
141
+
142
+ [More Information Needed]
143
+
144
+ ### Other Known Limitations
145
+
146
+ [More Information Needed]
147
+
148
+ ## Additional Information
149
+
150
+ ### Dataset Curators
151
+
152
+ [More Information Needed]
153
+
154
+ ### Licensing Information
155
+
156
+ [More Information Needed]
157
+
158
+ ### Citation Information
159
+
160
+ ```
161
+ @inproceedings{real2020assin,
162
+ title={The assin 2 shared task: a quick overview},
163
+ author={Real, Livy and Fonseca, Erick and Oliveira, Hugo Goncalo},
164
+ booktitle={International Conference on Computational Processing of the Portuguese Language},
165
+ pages={406--412},
166
+ year={2020},
167
+ organization={Springer}
168
+ }
169
+ ```
assin2.py ADDED
@@ -0,0 +1,126 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ from __future__ import absolute_import, division, print_function
18
+
19
+ import xml.etree.ElementTree as ET
20
+
21
+ import datasets
22
+
23
+
24
+ _CITATION = """
25
+ @inproceedings{real2020assin,
26
+ title={The assin 2 shared task: a quick overview},
27
+ author={Real, Livy and Fonseca, Erick and Oliveira, Hugo Goncalo},
28
+ booktitle={International Conference on Computational Processing of the Portuguese Language},
29
+ pages={406--412},
30
+ year={2020},
31
+ organization={Springer}
32
+ }
33
+ """
34
+
35
+ _DESCRIPTION = """
36
+ The ASSIN 2 corpus is composed of rather simple sentences. Following the procedures of SemEval 2014 Task 1.
37
+ The training and validation data are composed, respectively, of 6,500 and 500 sentence pairs in Brazilian Portuguese,
38
+ annotated for entailment and semantic similarity. Semantic similarity values range from 1 to 5, and text entailment
39
+ classes are either entailment or none. The test data are composed of approximately 3,000 sentence pairs with the same
40
+ annotation. All data were manually annotated.
41
+ """
42
+
43
+ _HOMEPAGE = "https://sites.google.com/view/assin2"
44
+
45
+ _LICENSE = ""
46
+
47
+ _URLS = {
48
+ "train": "https://drive.google.com/u/0/uc?id=1Q9j1a83CuKzsHCGaNulSkNxBm7Dkn7Ln&export=download",
49
+ "dev": "https://drive.google.com/u/0/uc?id=1kb7xq6Mb3eaqe9cOAo70BaG9ypwkIqEU&export=download",
50
+ "test": "https://drive.google.com/u/0/uc?id=1J3FpQaHxpM-FDfBUyooh-sZF-B-bM_lU&export=download",
51
+ }
52
+
53
+
54
+ class Assin2(datasets.GeneratorBasedBuilder):
55
+ """ASSIN 2 dataset."""
56
+
57
+ VERSION = datasets.Version("1.0.0")
58
+
59
+ def _info(self):
60
+ features = datasets.Features(
61
+ {
62
+ "sentence_pair_id": datasets.Value("int64"),
63
+ "premise": datasets.Value("string"),
64
+ "hypothesis": datasets.Value("string"),
65
+ "relatedness_score": datasets.Value("float32"),
66
+ "entailment_judgment": datasets.features.ClassLabel(names=["NONE", "ENTAILMENT"]),
67
+ }
68
+ )
69
+ return datasets.DatasetInfo(
70
+ description=_DESCRIPTION,
71
+ features=features,
72
+ supervised_keys=None,
73
+ homepage=_HOMEPAGE,
74
+ license=_LICENSE,
75
+ citation=_CITATION,
76
+ )
77
+
78
+ def _split_generators(self, dl_manager):
79
+ """Returns SplitGenerators."""
80
+ data_dir = dl_manager.download(_URLS)
81
+
82
+ return [
83
+ datasets.SplitGenerator(
84
+ name=datasets.Split.TRAIN,
85
+ gen_kwargs={
86
+ "filepath": data_dir["train"],
87
+ "split": "train",
88
+ },
89
+ ),
90
+ datasets.SplitGenerator(
91
+ name=datasets.Split.TEST,
92
+ gen_kwargs={
93
+ "filepath": data_dir["test"],
94
+ "split": "test",
95
+ },
96
+ ),
97
+ datasets.SplitGenerator(
98
+ name=datasets.Split.VALIDATION,
99
+ gen_kwargs={
100
+ "filepath": data_dir["dev"],
101
+ "split": "dev",
102
+ },
103
+ ),
104
+ ]
105
+
106
+ def _generate_examples(self, filepath, split):
107
+ """ Yields examples. """
108
+
109
+ id_ = 0
110
+
111
+ with open(filepath, "rb") as f:
112
+
113
+ tree = ET.parse(f)
114
+ root = tree.getroot()
115
+
116
+ for pair in root:
117
+
118
+ yield id_, {
119
+ "sentence_pair_id": int(pair.attrib.get("id")),
120
+ "premise": pair.find(".//t").text,
121
+ "hypothesis": pair.find(".//h").text,
122
+ "relatedness_score": float(pair.attrib.get("similarity")),
123
+ "entailment_judgment": pair.attrib.get("entailment").upper(),
124
+ }
125
+
126
+ id_ += 1
dataset_infos.json ADDED
@@ -0,0 +1 @@
 
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 Gon{\\c{c}}alo},\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"], "names_file": null, "id": null, "_type": "ClassLabel"}}, "post_processed": null, "supervised_keys": 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": 864003, "num_examples": 6500, "dataset_name": "assin2"}, "test": {"name": "test", "num_bytes": 339274, "num_examples": 2448, "dataset_name": "assin2"}, "validation": {"name": "validation", "num_bytes": 66832, "num_examples": 500, "dataset_name": "assin2"}}, "download_checksums": {"https://drive.google.com/u/0/uc?id=1Q9j1a83CuKzsHCGaNulSkNxBm7Dkn7Ln&export=download": {"num_bytes": 1505084, "checksum": "0909e113e30f53a64ee7ef28b3287e78790ca06e45011caf07d38777877e367f"}, "https://drive.google.com/u/0/uc?id=1kb7xq6Mb3eaqe9cOAo70BaG9ypwkIqEU&export=download": {"num_bytes": 115698, "checksum": "b6639e7fb562325fe847b249d96f14d7d4fab0d5fe5aa542c19089d0d0c9081c"}, "https://drive.google.com/u/0/uc?id=1J3FpQaHxpM-FDfBUyooh-sZF-B-bM_lU&export=download": {"num_bytes": 492864, "checksum": "246fbaa0a5f8120b00baee4c9d64bf6f0c6669fbdbcb9fab5563114699f3890c"}}, "download_size": 2113646, "post_processing_size": null, "dataset_size": 1270109, "size_in_bytes": 3383755}}
dummy/1.0.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8db1d0c09d9bf01d07289baaf19a56f09cde4eb34a9ae27bb45e49f522ca2744
3
+ size 3078