Open manisnesan opened 1 year ago
Outline
https://public.ukp.informatik.tu-darmstadt.de/thakur/BEIR/datasets/scifact.zip
GenericDataLoader
. Explore the corpus, queries, qrelspyserini
for getting a baseline using Lucene. So convert BEIR corpus to Pyserini Format {id: str, contents: str, title: str}
and id is the unique identifier for each document and is a required field.python -m pyserini.index.lucene \
-collection JsonCollection \
-input {save_dir}/scifact/corpus \
-index {save_dir}/indexes/scifact_corpus_jsonl \
-fields title contents \
-generator DefaultLuceneDocumentGenerator \
-threads 8 \
-storePositions -storeDocvectors -storeRaw
EvaluateRetrieval
which uses pytrec-eval module to calculate the standard retrieval measures such as NDCG, MAP, R@k, P@kReference
({'NDCG@1': 0.54, 'NDCG@3': 0.61219, 'NDCG@5': 0.64201, 'NDCG@10': 0.6647},
{'MAP@1': 0.51928, 'MAP@3': 0.58719, 'MAP@5': 0.60563, 'MAP@10': 0.61597},
{'Recall@1': 0.51928,
'Recall@3': 0.66233,
'Recall@5': 0.73189,
'Recall@10': 0.79978},
{'P@1': 0.54, 'P@3': 0.23556, 'P@5': 0.16, 'P@10': 0.08833})
Use a BEIR dataset (smallest ones) to set up an end to end evaluation.
Tools
Experiments
Books