Delete prepare_dl.py
Browse files- prepare_dl.py +0 -18
prepare_dl.py
DELETED
|
@@ -1,18 +0,0 @@
|
|
| 1 |
-
from pyserini.search import get_topics, get_qrels
|
| 2 |
-
import json
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
topics = get_topics('dl19-passage')
|
| 6 |
-
qrels = get_qrels('dl19-passage')
|
| 7 |
-
with open('dl19.jsonl', 'w') as f:
|
| 8 |
-
for topic_id in qrels:
|
| 9 |
-
query_id = topic_id
|
| 10 |
-
query = topics[query_id]['title']
|
| 11 |
-
positive_passages = []
|
| 12 |
-
negative_passages = []
|
| 13 |
-
f.write(json.dumps({
|
| 14 |
-
'query_id': str(query_id),
|
| 15 |
-
'query': query,
|
| 16 |
-
'positive_passages': positive_passages,
|
| 17 |
-
'negative_passages': negative_passages,
|
| 18 |
-
}) + '\n')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|