Fixing 1M dataset file name; ignoring header of topics files.
Browse files
quati.py
CHANGED
@@ -36,7 +36,7 @@ QUATI_10M_DATASET_PARTS=["part_00", "part_01", "part_02", "part_03", "part_04"]
|
|
36 |
|
37 |
|
38 |
_URLS = {
|
39 |
-
"quati_1M_passages": "https://huggingface.co/datasets/unicamp-dl/quati/resolve/main/
|
40 |
"quati_10M_passages_part_00": "https://huggingface.co/datasets/unicamp-dl/quati/resolve/main/quati_10M_part_00.tsv",
|
41 |
"quati_10M_passages_part_01": "https://huggingface.co/datasets/unicamp-dl/quati/resolve/main/quati_10M_part_01.tsv",
|
42 |
"quati_10M_passages_part_02": "https://huggingface.co/datasets/unicamp-dl/quati/resolve/main/quati_10M_part_02.tsv",
|
@@ -68,13 +68,14 @@ def generate_examples_qrels(filepath):
|
|
68 |
|
69 |
with open(filepath, encoding="utf-8") as input_file:
|
70 |
for (idx, line) in enumerate(input_file):
|
71 |
-
|
|
|
72 |
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
|
77 |
-
|
78 |
|
79 |
|
80 |
def generate_examples_topics(filepath):
|
|
|
36 |
|
37 |
|
38 |
_URLS = {
|
39 |
+
"quati_1M_passages": "https://huggingface.co/datasets/unicamp-dl/quati/resolve/main/quati_1M.tsv",
|
40 |
"quati_10M_passages_part_00": "https://huggingface.co/datasets/unicamp-dl/quati/resolve/main/quati_10M_part_00.tsv",
|
41 |
"quati_10M_passages_part_01": "https://huggingface.co/datasets/unicamp-dl/quati/resolve/main/quati_10M_part_01.tsv",
|
42 |
"quati_10M_passages_part_02": "https://huggingface.co/datasets/unicamp-dl/quati/resolve/main/quati_10M_part_02.tsv",
|
|
|
68 |
|
69 |
with open(filepath, encoding="utf-8") as input_file:
|
70 |
for (idx, line) in enumerate(input_file):
|
71 |
+
if idx > 0:
|
72 |
+
query_id, _, passage_id, score = line.rstrip().split(" ")
|
73 |
|
74 |
+
features = {"query_id": int(query_id),
|
75 |
+
"passage_id": passage_id,
|
76 |
+
"score": int(score)}
|
77 |
|
78 |
+
yield idx - 1, features
|
79 |
|
80 |
|
81 |
def generate_examples_topics(filepath):
|