Datasets:
test
Browse files- .gitattributes +2 -0
- poquad-test-A.json +3 -0
- poquad-test-B.json +3 -0
- poquad.py +18 -3
.gitattributes
CHANGED
@@ -52,3 +52,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
52 |
*.jpg filter=lfs diff=lfs merge=lfs -text
|
53 |
*.jpeg filter=lfs diff=lfs merge=lfs -text
|
54 |
*.webp filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
52 |
*.jpg filter=lfs diff=lfs merge=lfs -text
|
53 |
*.jpeg filter=lfs diff=lfs merge=lfs -text
|
54 |
*.webp filter=lfs diff=lfs merge=lfs -text
|
55 |
+
poquad-test-A.json filter=lfs diff=lfs merge=lfs -text
|
56 |
+
poquad-test-B.json filter=lfs diff=lfs merge=lfs -text
|
poquad-test-A.json
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:820c57bf2c53312a0e665b9b5d28710c12a5fb632d38609bdefab6d4ab23261d
|
3 |
+
size 1853775
|
poquad-test-B.json
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:2f6ea6c6a8437278edcb18da06606e800312130813c86b3aa83893f39029c173
|
3 |
+
size 1992166
|
poquad.py
CHANGED
@@ -24,6 +24,8 @@ PoQuaD description
|
|
24 |
_URLS = {
|
25 |
"train": "poquad-train.json",
|
26 |
"dev": "poquad-dev.json",
|
|
|
|
|
27 |
}
|
28 |
|
29 |
|
@@ -43,7 +45,7 @@ class SquadV2(datasets.GeneratorBasedBuilder):
|
|
43 |
|
44 |
# TODO(squad_v2): Set up version.
|
45 |
BUILDER_CONFIGS = [
|
46 |
-
SquadV2Config(name="poquad", version=datasets.Version("
|
47 |
]
|
48 |
|
49 |
def _info(self):
|
@@ -118,7 +120,20 @@ class SquadV2(datasets.GeneratorBasedBuilder):
|
|
118 |
elif "plausible_answers" in qa:
|
119 |
answers_key="plausible_answers"
|
120 |
else:
|
121 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
122 |
|
123 |
answer_starts = [answer["answer_start"] for answer in qa[answers_key]]
|
124 |
#answer_ends = [answer["answer_end"] for answer in qa["answers"]]
|
@@ -142,4 +157,4 @@ class SquadV2(datasets.GeneratorBasedBuilder):
|
|
142 |
"text": answers,
|
143 |
"generative_answer": generative_answers
|
144 |
},
|
145 |
-
}
|
|
|
24 |
_URLS = {
|
25 |
"train": "poquad-train.json",
|
26 |
"dev": "poquad-dev.json",
|
27 |
+
"test-A": "poquad-test-A.json",
|
28 |
+
"test-B": "poquad-test-B.json",
|
29 |
}
|
30 |
|
31 |
|
|
|
45 |
|
46 |
# TODO(squad_v2): Set up version.
|
47 |
BUILDER_CONFIGS = [
|
48 |
+
SquadV2Config(name="poquad", version=datasets.Version("2.0.0"), description="PoQuaD plaint text"),
|
49 |
]
|
50 |
|
51 |
def _info(self):
|
|
|
120 |
elif "plausible_answers" in qa:
|
121 |
answers_key="plausible_answers"
|
122 |
else:
|
123 |
+
yield str(id_), {
|
124 |
+
"id": str(id_),
|
125 |
+
"title": title,
|
126 |
+
"summary": summary,
|
127 |
+
"context": context,
|
128 |
+
"question": question,
|
129 |
+
"is_impossible" : None,
|
130 |
+
# "paragraph_id": paragraph_id,
|
131 |
+
"answers": {
|
132 |
+
|
133 |
+
},
|
134 |
+
}
|
135 |
+
continue
|
136 |
+
#raise ValueError
|
137 |
|
138 |
answer_starts = [answer["answer_start"] for answer in qa[answers_key]]
|
139 |
#answer_ends = [answer["answer_end"] for answer in qa["answers"]]
|
|
|
157 |
"text": answers,
|
158 |
"generative_answer": generative_answers
|
159 |
},
|
160 |
+
}
|