Xinyu Crystina ZHANG commited on
Commit ·
33075b8
1
Parent(s): 4c75721
data loading script
Browse files
miracl.py
CHANGED
|
@@ -167,9 +167,9 @@ class MIRACL(datasets.GeneratorBasedBuilder):
|
|
| 167 |
data['positive_passages'] = [{
|
| 168 |
'docid': docid,
|
| 169 |
**dict(zip(['title', 'text'], docid2doc[docid]))
|
| 170 |
-
} for docid in pos_docids]
|
| 171 |
data['negative_passages'] = [{
|
| 172 |
'docid': docid,
|
| 173 |
**dict(zip(['title', 'text'], docid2doc[docid]))
|
| 174 |
-
} for docid in
|
| 175 |
yield qid, data
|
|
|
|
| 167 |
data['positive_passages'] = [{
|
| 168 |
'docid': docid,
|
| 169 |
**dict(zip(['title', 'text'], docid2doc[docid]))
|
| 170 |
+
} for docid in pos_docids if docid in docid2doc]
|
| 171 |
data['negative_passages'] = [{
|
| 172 |
'docid': docid,
|
| 173 |
**dict(zip(['title', 'text'], docid2doc[docid]))
|
| 174 |
+
} for docid in neg_docidsi if docid in docid2doc]
|
| 175 |
yield qid, data
|