piotr-rybak
commited on
Commit
•
a80e735
1
Parent(s):
d6ee042
fix
Browse files- allegro-faq.py +2 -3
allegro-faq.py
CHANGED
@@ -34,7 +34,7 @@ _FEATURES_PAIRS = datasets.Features(
|
|
34 |
{
|
35 |
"question_id": datasets.Value("int32"),
|
36 |
"question": datasets.Value("string"),
|
37 |
-
"passage_id": datasets.Value("
|
38 |
"answers": datasets.Value("string"),
|
39 |
"passage_title": datasets.Value("string"),
|
40 |
"passage_text": datasets.Value("string"),
|
@@ -44,7 +44,7 @@ _FEATURES_PAIRS = datasets.Features(
|
|
44 |
|
45 |
_FEATURES_PASSAGES = datasets.Features(
|
46 |
{
|
47 |
-
"id": datasets.Value("
|
48 |
"title": datasets.Value("string"),
|
49 |
"text": datasets.Value("string"),
|
50 |
}
|
@@ -116,6 +116,5 @@ class AllegroFAQ(datasets.GeneratorBasedBuilder):
|
|
116 |
for filepath in filepaths:
|
117 |
with open(filepath, encoding="utf-8") as f:
|
118 |
for i, row in enumerate(f):
|
119 |
-
print(row)
|
120 |
parsed_row = json.loads(row)
|
121 |
yield i, parsed_row
|
|
|
34 |
{
|
35 |
"question_id": datasets.Value("int32"),
|
36 |
"question": datasets.Value("string"),
|
37 |
+
"passage_id": datasets.Value("int32"),
|
38 |
"answers": datasets.Value("string"),
|
39 |
"passage_title": datasets.Value("string"),
|
40 |
"passage_text": datasets.Value("string"),
|
|
|
44 |
|
45 |
_FEATURES_PASSAGES = datasets.Features(
|
46 |
{
|
47 |
+
"id": datasets.Value("int32"),
|
48 |
"title": datasets.Value("string"),
|
49 |
"text": datasets.Value("string"),
|
50 |
}
|
|
|
116 |
for filepath in filepaths:
|
117 |
with open(filepath, encoding="utf-8") as f:
|
118 |
for i, row in enumerate(f):
|
|
|
119 |
parsed_row = json.loads(row)
|
120 |
yield i, parsed_row
|