Xueguang Ma
commited on
Commit
•
153491a
1
Parent(s):
128e206
- .gitattributes +2 -0
- dl19.jsonl.gz +3 -0
- dl20.jsonl.gz +3 -0
- msmarco-passage.py +2 -0
- prepare_dl.py +18 -0
.gitattributes
CHANGED
@@ -27,3 +27,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
27 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
28 |
dev.jsonl.gz filter=lfs diff=lfs merge=lfs -text
|
29 |
train.jsonl.gz filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
27 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
28 |
dev.jsonl.gz filter=lfs diff=lfs merge=lfs -text
|
29 |
train.jsonl.gz filter=lfs diff=lfs merge=lfs -text
|
30 |
+
dl20.jsonl.gz filter=lfs diff=lfs merge=lfs -text
|
31 |
+
dl19.jsonl.gz filter=lfs diff=lfs merge=lfs -text
|
dl19.jsonl.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:763dffc8f19022181c8b55c5c3a4470a49ed964c6d38fea503f9fe499bcc9908
|
3 |
+
size 1161
|
dl20.jsonl.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:331e829922e2bd8ee1f01766fb7253c0d672ef79498011e91ad5e3e93f17a54a
|
3 |
+
size 1492
|
msmarco-passage.py
CHANGED
@@ -39,6 +39,8 @@ _DATASET_URLS = {
|
|
39 |
'train': "https://huggingface.co/datasets/Tevatron/msmarco-passage/resolve/main/train.jsonl.gz",
|
40 |
#'train': "https://www.dropbox.com/s/seqqbu90jopvtq5/msmarco_passage_train.json",
|
41 |
'dev': "https://huggingface.co/datasets/Tevatron/msmarco-passage/resolve/main/dev.jsonl.gz",
|
|
|
|
|
42 |
}
|
43 |
|
44 |
|
|
|
39 |
'train': "https://huggingface.co/datasets/Tevatron/msmarco-passage/resolve/main/train.jsonl.gz",
|
40 |
#'train': "https://www.dropbox.com/s/seqqbu90jopvtq5/msmarco_passage_train.json",
|
41 |
'dev': "https://huggingface.co/datasets/Tevatron/msmarco-passage/resolve/main/dev.jsonl.gz",
|
42 |
+
'dl19': "https://huggingface.co/datasets/Tevatron/msmarco-passage/resolve/main/dl19.jsonl.gz",
|
43 |
+
'dl20': "https://huggingface.co/datasets/Tevatron/msmarco-passage/resolve/main/dl20.jsonl.gz",
|
44 |
}
|
45 |
|
46 |
|
prepare_dl.py
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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')
|