Datasets:

Modalities:
Text
Languages:
Croatian
ArXiv:
Libraries:
Datasets
License:
parquet-converter commited on
Commit
be7dd39
·
1 Parent(s): f3f3a47

Update parquet files

Browse files
README.md DELETED
@@ -1,38 +0,0 @@
1
- ---
2
- language:
3
- - hr
4
- license:
5
- - cc-by-sa-4.0
6
- task_categories:
7
- - text-classification
8
- task_ids:
9
- - natural-language-inference
10
- tags:
11
- - causal-reasoning
12
- - textual-entailment
13
- - commonsense-reasoning
14
- ---
15
- The COPA-HR dataset (Choice of plausible alternatives in Croatian) is a translation
16
- of the English COPA dataset (https://people.ict.usc.edu/~gordon/copa.html) by following the
17
- XCOPA dataset translation methodology (https://arxiv.org/abs/2005.00333). The dataset consists of 1000 premises
18
- (My body cast a shadow over the grass), each given a question (What is the cause?), and two choices
19
- (The sun was rising; The grass was cut), with a label encoding which of the choices is more plausible
20
- given the annotator or translator (The sun was rising).
21
-
22
- The dataset is split into 400 training samples, 100 validation samples, and 500 test samples. It includes the
23
- following features: 'premise', 'choice1', 'choice2', 'label', 'question', 'changed' (boolean).
24
-
25
- If you use the dataset in your work, please cite
26
- ```
27
- @article{DBLP:journals/corr/abs-2104-09243,
28
- author = {Nikola Ljube\\\\v{s}i\\\\'{c} and
29
- Davor Lauc},
30
- title = {BERTi{\\\\'{c}} - The Transformer Language Model for Bosnian, Croatian,
31
- Montenegrin and Serbian},
32
- journal = {CoRR},
33
- volume = {abs/2104.09243},
34
- year = {2021},
35
- url = {https://arxiv.org/abs/2104.09243},
36
- archivePrefix = {arXiv},
37
- }
38
- ```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
copa_hr.py DELETED
@@ -1,120 +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
-
17
- import json
18
- import os
19
-
20
- import datasets
21
-
22
-
23
- _CITATION = """@article{DBLP:journals/corr/abs-2104-09243,
24
- author = {Nikola Ljubesic and
25
- Davor Lauc},
26
- title = {BERTi{\'{c}} - The Transformer Language Model for Bosnian, Croatian,
27
- Montenegrin and Serbian},
28
- journal = {CoRR},
29
- volume = {abs/2104.09243},
30
- year = {2021},
31
- url = {https://arxiv.org/abs/2104.09243},
32
- archivePrefix = {arXiv},
33
- }"""
34
- _DESCRIPTION = """The COPA-HR dataset (Choice of plausible alternatives in Croatian) is a translation
35
- of the English COPA dataset (https://people.ict.usc.edu/~gordon/copa.html) by following the
36
- XCOPA dataset translation methodology (https://arxiv.org/abs/2005.00333). The dataset consists of 1000 premises
37
- (My body cast a shadow over the grass), each given a question (What is the cause?), and two choices
38
- (The sun was rising; The grass was cut), with a label encoding which of the choices is more plausible
39
- given the annotator or translator (The sun was rising).
40
-
41
- The dataset is split into 400 training samples, 100 validation samples, and 500 test samples. It includes the
42
- following features: 'premise', 'choice1', 'choice2', 'label', 'question', 'changed' (boolean).
43
- """
44
- _HOMEPAGE = 'https://www.clarin.si/repository/xmlui/handle/11356/1404'
45
- _LICENSE = ''
46
-
47
- _URL = 'https://huggingface.co/datasets/classla/copa_hr/raw/main/data.zip'
48
- _TRAINING_FILE = 'train.jsonl'
49
- _DEV_FILE = 'val.jsonl'
50
- _TEST_FILE = 'test.jsonl'
51
-
52
-
53
- class CopaHr(datasets.GeneratorBasedBuilder):
54
- VERSION = datasets.Version('1.0.0')
55
-
56
- BUILDER_CONFIGS = [
57
- datasets.BuilderConfig(
58
- name='copa_hr',
59
- version=VERSION,
60
- description=''
61
- )
62
- ]
63
-
64
- def _info(self):
65
- features = datasets.Features(
66
- {
67
- 'premise': datasets.Value('string'),
68
- 'choice1': datasets.Value('string'),
69
- 'choice2': datasets.Value('string'),
70
- 'label': datasets.features.ClassLabel(names=['0', '1']),
71
- 'question': datasets.Value('string'),
72
- 'idx': datasets.Value('int64'),
73
- 'changed': datasets.Value('bool')
74
- }
75
- )
76
-
77
- return datasets.DatasetInfo(
78
- description=_DESCRIPTION,
79
- features=features,
80
- supervised_keys=None,
81
- homepage=_HOMEPAGE,
82
- license=_LICENSE,
83
- citation=_CITATION,
84
- )
85
-
86
- def _split_generators(self, dl_manager):
87
- """Returns SplitGenerators."""
88
- data_dir = dl_manager.download_and_extract(_URL)
89
-
90
- return [
91
- datasets.SplitGenerator(
92
- name=datasets.Split.TRAIN, gen_kwargs={
93
- 'filepath': os.path.join(data_dir, _TRAINING_FILE),
94
- 'split': 'train'}
95
- ),
96
- datasets.SplitGenerator(
97
- name=datasets.Split.VALIDATION, gen_kwargs={
98
- 'filepath': os.path.join(data_dir, _DEV_FILE),
99
- 'split': 'dev'}
100
- ),
101
- datasets.SplitGenerator(
102
- name=datasets.Split.TEST, gen_kwargs={
103
- 'filepath': os.path.join(data_dir, _TEST_FILE),
104
- 'split': 'test'}
105
- ),
106
- ]
107
-
108
- def _generate_examples(self, filepath, split):
109
- with open(filepath, encoding='utf-8') as f:
110
- for i, line in enumerate(f):
111
- data = json.loads(line)
112
- yield i, {
113
- 'premise': data['premise'],
114
- 'choice1': data['choice1'],
115
- 'choice2': data['choice2'],
116
- 'question': data['question'],
117
- 'label': str(data['label']),
118
- 'idx': data['idx'],
119
- 'changed': data['changed']
120
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
copa_hr/copa_hr-test.parquet ADDED
Binary file (43.3 kB). View file
 
copa_hr/copa_hr-train.parquet ADDED
Binary file (36.9 kB). View file
 
copa_hr/copa_hr-validation.parquet ADDED
Binary file (12.8 kB). View file
 
data.zip DELETED
Binary file (48 kB)