nyu-dl / dl4marco-bert

BSD 3-Clause "New" or "Revised" License
476 stars 87 forks source link

Standard TREC format #42

Closed Yastil closed 4 years ago

Yastil commented 4 years ago

Hi, I am trying to get the msmarco_file into the standard TREC format; query_id Q0 doc-id rank score exp

I tried using; msmarco_file.write("\t".join((query_id, 'Q0', doc_id, str(rank), str(score[doc_idx]), 'run1')) + "\n")

However the scores appear to be negative, which causes trec_eval to fail. Is there perhaps another variable that should be used to obtain the score for each query-document pair?

rodrigonogueira4 commented 4 years ago

You can do score = 1/rank

Yastil commented 4 years ago

Thank you x 2!