Upload 3 files
Browse files- README.md +15 -0
- folio.txt +50 -0
- validation.jsonl +0 -0
README.md
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: cc
|
3 |
+
task_categories:
|
4 |
+
- text-classification
|
5 |
+
language:
|
6 |
+
- en
|
7 |
+
---
|
8 |
+
```
|
9 |
+
@article{han2022folio,
|
10 |
+
title={FOLIO: Natural Language Reasoning with First-Order Logic},
|
11 |
+
author = {Han, Simeng and Schoelkopf, Hailey and Zhao, Yilun and Qi, Zhenting and Riddell, Martin and Benson, Luke and Sun, Lucy and Zubova, Ekaterina and Qiao, Yujie and Burtell, Matthew and Peng, David and Fan, Jonathan and Liu, Yixin and Wong, Brian and Sailor, Malcolm and Ni, Ansong and Nan, Linyong and Kasai, Jungo and Yu, Tao and Zhang, Rui and Joty, Shafiq and Fabbri, Alexander R. and Kryscinski, Wojciech and Lin, Xi Victoria and Xiong, Caiming and Radev, Dragomir},
|
12 |
+
journal={arXiv preprint arXiv:2209.00840},
|
13 |
+
url = {https://arxiv.org/abs/2209.00840},
|
14 |
+
year={2022}
|
15 |
+
```
|
folio.txt
ADDED
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import datasets
|
2 |
+
import json
|
3 |
+
import os
|
4 |
+
|
5 |
+
citation='''
|
6 |
+
@article{han2022folio,
|
7 |
+
title={FOLIO: Natural Language Reasoning with First-Order Logic},
|
8 |
+
author = {Han, Simeng and Schoelkopf, Hailey and Zhao, Yilun and Qi, Zhenting and Riddell, Martin and Benson, Luke and Sun, Lucy and Zubova, Ekaterina and Qiao, Yujie and Burtell, Matthew and Peng, David and Fan, Jonathan and Liu, Yixin and Wong, Brian and Sailor, Malcolm and Ni, Ansong and Nan, Linyong and Kasai, Jungo and Yu, Tao and Zhang, Rui and Joty, Shafiq and Fabbri, Alexander R. and Kryscinski, Wojciech and Lin, Xi Victoria and Xiong, Caiming and Radev, Dragomir},
|
9 |
+
journal={arXiv preprint arXiv:2209.00840},
|
10 |
+
url = {https://arxiv.org/abs/2209.00840},
|
11 |
+
year={2022}
|
12 |
+
}
|
13 |
+
'''
|
14 |
+
|
15 |
+
class FolioConfig(datasets.BuilderConfig):
|
16 |
+
citation=citation
|
17 |
+
|
18 |
+
files = ["folio-validation.jsonl"]
|
19 |
+
|
20 |
+
_URLs = {f:f"https://huggingface.co/datasets/benlipkin/folio/resolve/main/{f}" for f in files}
|
21 |
+
|
22 |
+
class Folio(datasets.GeneratorBasedBuilder):
|
23 |
+
BUILDER_CONFIGS = [
|
24 |
+
FolioConfig(
|
25 |
+
name='.'.join(n.split('.')[:-1]),
|
26 |
+
data_dir=n
|
27 |
+
) for n in files
|
28 |
+
]
|
29 |
+
|
30 |
+
|
31 |
+
def _split_generators(self, dl_manager: datasets.DownloadManager):
|
32 |
+
data_file = dl_manager.download(_URLs)
|
33 |
+
path=data_file[self.config.data_dir]
|
34 |
+
pval=os.path.join(path,"folio-validation.jsonl")
|
35 |
+
|
36 |
+
return [
|
37 |
+
datasets.SplitGenerator(name=datasets.Split.VALIDATION, gen_kwargs={"filepath": pval}),
|
38 |
+
]
|
39 |
+
|
40 |
+
def _info(self):
|
41 |
+
return datasets.DatasetInfo()
|
42 |
+
|
43 |
+
def _generate_examples(self, filepath):
|
44 |
+
cols=["premises", "premises-FOL", "conclusion", "conclusion-FOL", "label"]
|
45 |
+
"""Yields examples."""
|
46 |
+
with open(filepath, "r", encoding="utf-8") as f:
|
47 |
+
for id_, line in enumerate(f):
|
48 |
+
line_dict = json.loads(line)
|
49 |
+
line_dict={k:v for k,v in line_dict.items() if k in cols}
|
50 |
+
yield id_, line_dict
|
validation.jsonl
ADDED
The diff for this file is too large to render.
See raw diff
|
|