Open jenhsia opened 3 months ago
Thanks @jenhsia! This is also something that would be very helpful to me. Would be great if one of the maintainers could check this? 😇 @santhnm2 @okhat
BTW, it would also be good to remove the requirement for qids to be integers. @jenhsia, maybe you could amend your PR and also comment in evaluation/loaders.py
qid = int(qid)
In the original repo, the index corpus tsv file requires that the pid is an integer, but there may be cases where we want it to use passage id (string) instead of passage index (int). These commits allow pid to be a non-integer and allows easy access of the passage ids after passage ranking.
If we save the passage-index-to-passage-id list (
pid_list
) in thesearcher.collection
, then we can use it to easily access passage_id after ranking as follows.