Datasets:

Modalities:
Text
Formats:
parquet
Languages:
English
ArXiv:
Libraries:
Datasets
pandas
License:
SaylorTwift HF Staff commited on
Commit
61771ab
·
verified ·
1 Parent(s): 66dc4a3

Delete loading script

Browse files
Files changed (1) hide show
  1. prost.py +0 -85
prost.py DELETED
@@ -1,85 +0,0 @@
1
- # Copyright 2020 The HuggingFace Datasets Authors and Cory Paik
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the 'License');
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # http://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an 'AS IS' BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
- # ==============================================================================
15
- """ Physical Reasoning about Objects Through Space and Time (PROST)
16
-
17
- PROST is a probing dataset to evaluate the ability of pretrained LMs to
18
- understand and reason about the physical world.
19
- """
20
- import json
21
- import datasets
22
-
23
-
24
- _CITATION = """\
25
- @inproceedings{aroca-ouellette-etal-2021-prost,
26
- title = "{PROST}: {P}hysical Reasoning about Objects through Space and Time",
27
- author = "Aroca-Ouellette, St{\'e}phane and
28
- Paik, Cory and
29
- Roncone, Alessandro and
30
- Kann, Katharina",
31
- booktitle = "Findings of the Association for Computational Linguistics: ACL-IJCNLP 2021",
32
- month = aug,
33
- year = "2021",
34
- address = "Online",
35
- publisher = "Association for Computational Linguistics",
36
- url = "https://aclanthology.org/2021.findings-acl.404",
37
- pages = "4597--4608",
38
- }
39
- """
40
-
41
-
42
- _DESCRIPTION = """\
43
- *Physical Reasoning about Objects Through Space and Time* (PROST) is a probing dataset to evaluate the ability of pretrained LMs to understand and reason about the physical world. PROST consists of 18,736 cloze-style multiple choice questions from 14 manually curated templates, covering 10 physical reasoning concepts: direction, mass, height, circumference, stackable, rollable, graspable, breakable, slideable, and bounceable.
44
- """
45
-
46
- _HOMEPAGE = 'https://github.com/nala-cub/prost'
47
- _LICENSE = 'Apache 2.0'
48
-
49
- _URL = 'https://huggingface.co/datasets/corypaik/prost/resolve/main/data'
50
-
51
- _URLs = {'default': f'{_URL}/default.jsonl'}
52
-
53
- MC_LABELS = list('ABCD')
54
-
55
-
56
- class Prost(datasets.GeneratorBasedBuilder):
57
-
58
- VERSION = datasets.Version('1.0.1')
59
-
60
- def _info(self):
61
- features = datasets.Features({
62
- 'A': datasets.Value('string'),
63
- 'B': datasets.Value('string'),
64
- 'C': datasets.Value('string'),
65
- 'D': datasets.Value('string'),
66
- 'context': datasets.Value('string'),
67
- 'question': datasets.Value('string'),
68
- 'ex_question': datasets.Value('string'),
69
- 'group': datasets.Value('string'),
70
- 'label': datasets.ClassLabel(names=MC_LABELS),
71
- 'name': datasets.Value('string'),})
72
- return datasets.DatasetInfo(description=_DESCRIPTION, features=features,
73
- supervised_keys=None, homepage=_HOMEPAGE,
74
- license=_LICENSE, citation=_CITATION)
75
-
76
- def _split_generators(self, dl_manager):
77
- """ Returns SplitGenerators."""
78
- path = dl_manager.download_and_extract(_URLs[self.config.name])
79
- kwargs = {'path': path}
80
- return [datasets.SplitGenerator(datasets.Split.TEST, gen_kwargs=kwargs)]
81
-
82
- def _generate_examples(self, path):
83
- with open(path, 'r') as f:
84
- for _id, line in enumerate(f.readlines()):
85
- yield _id, json.loads(line)