asahi417 commited on
Commit
7d44973
1 Parent(s): af04df8

fix dataset

Browse files
Files changed (1) hide show
  1. process/tweet_qa.py +4 -4
process/tweet_qa.py CHANGED
@@ -2,7 +2,7 @@ import os
2
  import json
3
  from datasets import load_dataset
4
 
5
- os.makedirs("data/tweet_qg", exist_ok=True)
6
  data = load_dataset("lmqg/qg_tweetqa")
7
 
8
 
@@ -19,11 +19,11 @@ def process(tmp):
19
  train = process(data["train"].to_pandas())
20
  val = process(data["validation"].to_pandas())
21
  test = process(data["test"].to_pandas())
22
- with open("data/tweet_qg/train.jsonl", "w") as f:
23
  f.write("\n".join([json.dumps(i) for i in train]))
24
- with open("data/tweet_qg/validation.jsonl", "w") as f:
25
  f.write("\n".join([json.dumps(i) for i in val]))
26
- with open("data/tweet_qg/test.jsonl", "w") as f:
27
  f.write("\n".join([json.dumps(i) for i in test]))
28
 
29
 
 
2
  import json
3
  from datasets import load_dataset
4
 
5
+ os.makedirs("data/tweet_qa", exist_ok=True)
6
  data = load_dataset("lmqg/qg_tweetqa")
7
 
8
 
 
19
  train = process(data["train"].to_pandas())
20
  val = process(data["validation"].to_pandas())
21
  test = process(data["test"].to_pandas())
22
+ with open("data/tweet_qa/train.jsonl", "w") as f:
23
  f.write("\n".join([json.dumps(i) for i in train]))
24
+ with open("data/tweet_qa/validation.jsonl", "w") as f:
25
  f.write("\n".join([json.dumps(i) for i in val]))
26
+ with open("data/tweet_qa/test.jsonl", "w") as f:
27
  f.write("\n".join([json.dumps(i) for i in test]))
28
 
29