Update parsinlu-multiple-choice.py
Browse files
parsinlu-multiple-choice.py
CHANGED
@@ -42,7 +42,7 @@ class ParsinluMultipleChoice(datasets.GeneratorBasedBuilder):
|
|
42 |
def _info(self):
|
43 |
features = datasets.Features(
|
44 |
{
|
45 |
-
"answer": datasets.Value("
|
46 |
"candidates": datasets.features.Sequence(feature=datasets.Value(dtype='string', id=None), length=-1),
|
47 |
"category": datasets.Value("string"),
|
48 |
"question": datasets.Value("string"),
|
@@ -105,7 +105,7 @@ class ParsinluMultipleChoice(datasets.GeneratorBasedBuilder):
|
|
105 |
for id_, row in enumerate(f):
|
106 |
data = json.loads(row)
|
107 |
yield id_, {
|
108 |
-
"answer": data["answer"],
|
109 |
"candidates": data["candidates"],
|
110 |
"category": data["category"],
|
111 |
"question": data["question"],
|
|
|
42 |
def _info(self):
|
43 |
features = datasets.Features(
|
44 |
{
|
45 |
+
"answer": datasets.Value("int32"),
|
46 |
"candidates": datasets.features.Sequence(feature=datasets.Value(dtype='string', id=None), length=-1),
|
47 |
"category": datasets.Value("string"),
|
48 |
"question": datasets.Value("string"),
|
|
|
105 |
for id_, row in enumerate(f):
|
106 |
data = json.loads(row)
|
107 |
yield id_, {
|
108 |
+
"answer": int(data["answer"]),
|
109 |
"candidates": data["candidates"],
|
110 |
"category": data["category"],
|
111 |
"question": data["question"],
|