Skip to content

Commit

Permalink
Update trec_eval.py
Browse files Browse the repository at this point in the history
  • Loading branch information
sunnweiwei authored Feb 24, 2024
1 parent 57ecaf0 commit 7ad8e09
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions trec_eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,12 @@ def get_qrels_file(name):
'robust04': 'beir-v1.0.0-robust04-test',
'signal': 'beir-v1.0.0-signal1m-test',
}
name = THE_TOPICS[name]
name = THE_TOPICS.get(name, '')
name = name.replace('-test', '.test')
name = 'data/label_file/qrels.' + name + '.txt'
name = 'data/label_file/qrels.' + name + '.txt' # try to use cache
if not os.path.exists():
from pyserini.search import get_qrels_file
return get_qrels_file(name) # download from pyserini
return name


Expand Down

0 comments on commit 7ad8e09

Please sign in to comment.