Datasets:
GEM
/

Tasks:
Other
Modalities:
Text
Languages:
English
ArXiv:
Libraries:
Datasets
License:
WorkInTheDark commited on
Commit
76a9864
1 Parent(s): 4cbdb9b
Files changed (5) hide show
  1. dataset_infos.json +1 -1
  2. fairytaleqa.py +10 -9
  3. test.json +2 -2
  4. train.json +2 -2
  5. 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": 11603740, "checksum": "0fa291ddf323a73f5210d5c48c56ed8aa348d9a1ba8d9917c4fc2d72b484cc30"}, "valid.json": {"num_bytes": 1314327, "checksum": "963d2115e4fecddb9572cc18d0a2c82d483e6ab565e4835b5b5ed51eb6cabd0e"}, "test.json": {"num_bytes": 1285095, "checksum": "dd1e663069786ebd24f5325aadd00bab73a289692c8375488281c5a7d6d555c6"}}, "download_size": 14203162, "post_processing_size": null, "dataset_size": 13142307, "size_in_bytes": 27345469}}
 
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(json_data["data"]):
162
- story_name = row['story_name']
163
- content = row['content']
164
- answer = row['answer']
165
- question = row['question']
166
- local_or_sum = row['local_or_sum']
167
- attribute = row['attribute']
168
- ex_or_im = row['ex_or_im']
 
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:dd1e663069786ebd24f5325aadd00bab73a289692c8375488281c5a7d6d555c6
3
- size 1285095
 
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:0fa291ddf323a73f5210d5c48c56ed8aa348d9a1ba8d9917c4fc2d72b484cc30
3
- size 11603740
 
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:963d2115e4fecddb9572cc18d0a2c82d483e6ab565e4835b5b5ed51eb6cabd0e
3
- size 1314327
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d14f070e6b11334d054efeb795574833450a41a8d6403c201e1a8cafc2733fd4
3
+ size 1259984