-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsearch
executable file
·31 lines (24 loc) · 979 Bytes
/
search
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/usr/bin/env bash
cd /work/anserini
# MS MARCO data directory
DATA_DIR=./msmarco_data
# Only interested in queries from the qrels file
python3 ./src/main/python/msmarco/filter_queries.py \
--qrels=${DATA_DIR}/qrels.dev.small.tsv \
--queries=${DATA_DIR}/queries.dev.tsv \
--output_queries=${DATA_DIR}/queries.dev.small.tsv
# Do retrieval
python3 ./src/main/python/msmarco/retrieve.py \
--index ${DATA_DIR}/lucene-index-msmarco \
--qid_queries ${DATA_DIR}/queries.dev.small.tsv \
--output ${DATA_DIR}/run.dev.small.tsv --hits 1000
# MS MARCO eval on run
python3 ./src/main/python/msmarco/msmarco_eval.py \
${DATA_DIR}/qrels.dev.small.tsv \
${DATA_DIR}/run.dev.small.tsv
# Convert run to TREC format
python3 ./src/main/python/msmarco/convert_msmarco_to_trec_run.py \
--input_run ${DATA_DIR}/run.dev.small.tsv \
--output_run ${DATA_DIR}/run.dev.small.trec
# Copy to output dir for trec_eval
cp ${DATA_DIR}/run.dev.small.trec /output/