Datasets:
Tasks:
Text Retrieval
Modalities:
Text
Formats:
json
Sub-tasks:
multiple-choice-qa
Languages:
English
Size:
1M - 10M
License:
| import json | |
| with open("/home/liuqi/workspace/research/topics-and-qrels/topics.dl19-passage.txt") as f: | |
| queries = [] | |
| for line in f: | |
| qid, text = line.strip().split("\t") | |
| queries.append({"_id": qid, "text": text}) | |
| with open("queries.jsonl", "w") as f: | |
| for query in queries: | |
| f.write(json.dumps(query) + "\n") | |
| with open("/home/liuqi/workspace/research/topics-and-qrels/qrels.dl19-passage.txt") as f: | |
| qrels = [] | |
| for line in f: | |
| if not line.strip(): | |
| continue | |
| qid, _, docid, score = line.strip().split() | |
| qrels.append({"query-id": qid, "corpus-id": docid, "score": score}) | |
| with open("test.jsonl", "w") as f: | |
| for qrel in qrels: | |
| f.write(json.dumps(qrel) + "\n") | |