crystina-z
commited on
Update xor-tydi.py
Browse files- xor-tydi.py +3 -0
xor-tydi.py
CHANGED
@@ -67,6 +67,7 @@ class XORTyDi(datasets.GeneratorBasedBuilder):
|
|
67 |
'query_id': datasets.Value('string'),
|
68 |
'query': datasets.Value('string'),
|
69 |
'answers': [datasets.Value('string')],
|
|
|
70 |
'positive_passages': [
|
71 |
{'docid': datasets.Value('string'), 'text': datasets.Value('string'),
|
72 |
'title': datasets.Value('string')}
|
@@ -144,6 +145,7 @@ class XORTyDi(datasets.GeneratorBasedBuilder):
|
|
144 |
"query_id": _id,
|
145 |
"query": data["question"],
|
146 |
"answers": data.get("answers", []),
|
|
|
147 |
"positive_passages": process_ctx(positive_ctxs, "pos"),
|
148 |
"negative_passages": process_ctx(hard_negative_ctxs, "neg"),
|
149 |
}
|
@@ -153,6 +155,7 @@ class XORTyDi(datasets.GeneratorBasedBuilder):
|
|
153 |
"query_id": data["id"],
|
154 |
"query": data["question"],
|
155 |
"answers": data.get("answers", []),
|
|
|
156 |
"positive_passages": [],
|
157 |
"negative_passages": [],
|
158 |
}
|
|
|
67 |
'query_id': datasets.Value('string'),
|
68 |
'query': datasets.Value('string'),
|
69 |
'answers': [datasets.Value('string')],
|
70 |
+
'lang': datasets.Value('string'),
|
71 |
'positive_passages': [
|
72 |
{'docid': datasets.Value('string'), 'text': datasets.Value('string'),
|
73 |
'title': datasets.Value('string')}
|
|
|
145 |
"query_id": _id,
|
146 |
"query": data["question"],
|
147 |
"answers": data.get("answers", []),
|
148 |
+
"lang": data["lang"],
|
149 |
"positive_passages": process_ctx(positive_ctxs, "pos"),
|
150 |
"negative_passages": process_ctx(hard_negative_ctxs, "neg"),
|
151 |
}
|
|
|
155 |
"query_id": data["id"],
|
156 |
"query": data["question"],
|
157 |
"answers": data.get("answers", []),
|
158 |
+
"lang": data["lang"],
|
159 |
"positive_passages": [],
|
160 |
"negative_passages": [],
|
161 |
}
|