Datasets:
Tasks:
Other
Modalities:
Text
Languages:
English
Size:
10K - 100K
ArXiv:
Tags:
question-generation
License:
WorkInTheDark
commited on
Commit
•
76a9864
1
Parent(s):
4cbdb9b
upload
Browse files- dataset_infos.json +1 -1
- fairytaleqa.py +10 -9
- test.json +2 -2
- train.json +2 -2
- valid.json +2 -2
dataset_infos.json
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"default": {"description": "The FairytaleQA dataset focusing on narrative comprehension of kindergarten to eighth-grade students. Generated by educational experts based on an evidence-based theoretical framework, FairytaleQA consists of 10,580 explicit and implicit questions derived from 278 children-friendly stories, covering seven types of narrative elements or relations. This is for the Question Generation Task of FairytaleQA.\n", "citation": "@inproceedings{xu2022fairytaleqa,\n author={Xu, Ying and Wang, Dakuo and Yu, Mo and Ritchie, Daniel and Yao, Bingsheng and Wu, Tongshuang and Zhang, Zheng and Li, Toby Jia-Jun and Bradford, Nora and Sun, Branda and Hoang, Tran Bao and Sang, Yisi and Hou, Yufang and Ma, Xiaojuan and Yang, Diyi and Peng, Nanyun and Yu, Zhou and Warschauer, Mark},\n title = {Fantastic Questions and Where to Find Them: Fairytale{QA} -- An Authentic Dataset for Narrative Comprehension},\n publisher = {Association for Computational Linguistics},\n year = {2022}\n}\n", "homepage": "https://github.com/uci-soe/FairytaleQAData", "license": "", "features": {"story_name": {"dtype": "string", "id": null, "_type": "Value"}, "content": {"dtype": "string", "id": null, "_type": "Value"}, "answer": {"dtype": "string", "id": null, "_type": "Value"}, "gem_id": {"dtype": "string", "id": null, "_type": "Value"}, "target": {"dtype": "string", "id": null, "_type": "Value"}, "references": [{"dtype": "string", "id": null, "_type": "Value"}], "local_or_sum": {"dtype": "string", "id": null, "_type": "Value"}, "attribute": {"dtype": "string", "id": null, "_type": "Value"}, "ex_or_im": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": "fairytale_qa", "config_name": "default", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 10644996, "num_examples": 8548, "dataset_name": "fairytale_qa"}, "validation": {"name": "validation", "num_bytes": 1266906, "num_examples": 1025, "dataset_name": "fairytale_qa"}, "test": {"name": "test", "num_bytes": 1230405, "num_examples": 1007, "dataset_name": "fairytale_qa"}}, "download_checksums": {"train.json": {"num_bytes":
|
|
|
1 |
+
{"default": {"description": "The FairytaleQA dataset focusing on narrative comprehension of kindergarten to eighth-grade students. Generated by educational experts based on an evidence-based theoretical framework, FairytaleQA consists of 10,580 explicit and implicit questions derived from 278 children-friendly stories, covering seven types of narrative elements or relations. This is for the Question Generation Task of FairytaleQA.\n", "citation": "@inproceedings{xu2022fairytaleqa,\n author={Xu, Ying and Wang, Dakuo and Yu, Mo and Ritchie, Daniel and Yao, Bingsheng and Wu, Tongshuang and Zhang, Zheng and Li, Toby Jia-Jun and Bradford, Nora and Sun, Branda and Hoang, Tran Bao and Sang, Yisi and Hou, Yufang and Ma, Xiaojuan and Yang, Diyi and Peng, Nanyun and Yu, Zhou and Warschauer, Mark},\n title = {Fantastic Questions and Where to Find Them: Fairytale{QA} -- An Authentic Dataset for Narrative Comprehension},\n publisher = {Association for Computational Linguistics},\n year = {2022}\n}\n", "homepage": "https://github.com/uci-soe/FairytaleQAData", "license": "", "features": {"story_name": {"dtype": "string", "id": null, "_type": "Value"}, "content": {"dtype": "string", "id": null, "_type": "Value"}, "answer": {"dtype": "string", "id": null, "_type": "Value"}, "gem_id": {"dtype": "string", "id": null, "_type": "Value"}, "target": {"dtype": "string", "id": null, "_type": "Value"}, "references": [{"dtype": "string", "id": null, "_type": "Value"}], "local_or_sum": {"dtype": "string", "id": null, "_type": "Value"}, "attribute": {"dtype": "string", "id": null, "_type": "Value"}, "ex_or_im": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": "fairytale_qa", "config_name": "default", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 10644996, "num_examples": 8548, "dataset_name": "fairytale_qa"}, "validation": {"name": "validation", "num_bytes": 1266906, "num_examples": 1025, "dataset_name": "fairytale_qa"}, "test": {"name": "test", "num_bytes": 1230405, "num_examples": 1007, "dataset_name": "fairytale_qa"}}, "download_checksums": {"train.json": {"num_bytes": 11150678, "checksum": "41c17f4b51f52b215af05fdaee66f7f31de24455083c395837565b91f35b50c1"}, "valid.json": {"num_bytes": 1259984, "checksum": "d14f070e6b11334d054efeb795574833450a41a8d6403c201e1a8cafc2733fd4"}, "test.json": {"num_bytes": 1231706, "checksum": "8e5fcacea2da0cce61a151074adaf45e6080fd6670be84c44a66eb02388b9e08"}}, "download_size": 13642368, "post_processing_size": null, "dataset_size": 13142307, "size_in_bytes": 26784675}}
|
fairytaleqa.py
CHANGED
@@ -155,17 +155,18 @@ class FairytaleQA(datasets.GeneratorBasedBuilder):
|
|
155 |
|
156 |
with open(filepath, encoding="utf-8") as f:
|
157 |
|
158 |
-
json_data = json.load(f)
|
159 |
|
160 |
|
161 |
-
for id_, row in enumerate(
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
|
|
169 |
# data = json.loads(row)
|
170 |
|
171 |
yield id_, {
|
|
|
155 |
|
156 |
with open(filepath, encoding="utf-8") as f:
|
157 |
|
158 |
+
# json_data = json.load(f)
|
159 |
|
160 |
|
161 |
+
for id_, row in enumerate(f):
|
162 |
+
data = json.loads(row)
|
163 |
+
story_name = data['story_name']
|
164 |
+
content = data['content']
|
165 |
+
answer = data['answer']
|
166 |
+
question = data['question']
|
167 |
+
local_or_sum = data['local_or_sum']
|
168 |
+
attribute = data['attribute']
|
169 |
+
ex_or_im = data['ex_or_im']
|
170 |
# data = json.loads(row)
|
171 |
|
172 |
yield id_, {
|
test.json
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:8e5fcacea2da0cce61a151074adaf45e6080fd6670be84c44a66eb02388b9e08
|
3 |
+
size 1231706
|
train.json
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:41c17f4b51f52b215af05fdaee66f7f31de24455083c395837565b91f35b50c1
|
3 |
+
size 11150678
|
valid.json
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:d14f070e6b11334d054efeb795574833450a41a8d6403c201e1a8cafc2733fd4
|
3 |
+
size 1259984
|