AlibabaResearch / AlibabaResearch/HLATR
read_qrel
Aperta
- Lingua principale
- Python
- Stelle
- 76
- Fork
- 11
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
In this funion have the "qrel[qid] = pid",but if there are many passages for one query, such as MS MARCO dataset, there will be wrong.
def read_qrel(self, qrel_file):
qrel = {}
with open(qrel_file, 'r', encoding='utf8') as f:
for line in f:
line = line.strip()
seg = line.split('\t')
qid, pid = seg[0], seg[2]
qrel[qid] = pid
print ("Finish reading qrel dict")
return qrel
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Valutazione
Questa issue non è ancora stata valutata.