Datasets:
Vaibhav Adlakha
commited on
Commit
·
8b6e9d4
1
Parent(s):
dff1cc7
changes in script
Browse files- TopiOCQA.py +6 -5
TopiOCQA.py
CHANGED
@@ -46,8 +46,8 @@ TopiOCQA is an information-seeking conversational dataset with challenging topic
|
|
46 |
|
47 |
# _URL = "https://rajpurkar.github.io/SQuAD-explorer/dataset/"
|
48 |
_URLS = {
|
49 |
-
"train": "data/topiocqa_train.
|
50 |
-
"valid": "data/topiocqa_valid.
|
51 |
}
|
52 |
|
53 |
|
@@ -121,7 +121,8 @@ class Squad(datasets.GeneratorBasedBuilder):
|
|
121 |
logger.info("generating examples from = %s", filepath)
|
122 |
key = 0
|
123 |
with open(filepath, encoding="utf-8") as f:
|
124 |
-
|
125 |
-
|
126 |
-
yield key,
|
127 |
key += 1
|
|
|
|
46 |
|
47 |
# _URL = "https://rajpurkar.github.io/SQuAD-explorer/dataset/"
|
48 |
_URLS = {
|
49 |
+
"train": "data/topiocqa_train.jsonl",
|
50 |
+
"valid": "data/topiocqa_valid.jsonl",
|
51 |
}
|
52 |
|
53 |
|
|
|
121 |
logger.info("generating examples from = %s", filepath)
|
122 |
key = 0
|
123 |
with open(filepath, encoding="utf-8") as f:
|
124 |
+
for line in f:
|
125 |
+
data = json.loads(line)
|
126 |
+
yield key, data
|
127 |
key += 1
|
128 |
+
|