/ceqe-release

Primary LanguageJupyter Notebook

CEQE: Contextualized Embeddings for Query Expansion

This repo contains the code for our paper CEQE: Contextualized Embeddings for Query Expansion.

Introduction

CEQE (Contextualized Embeddings for Query Expansion) is a query expansion model that leverage pre-trained language models and relevance model principles to rank expansion terms for a given query. We support BERT as the pre-trained language model.

Getting Started

To run CEQE, you need to have the following data:

To rank the expansion term for a given query (for example query "301" in Robust04 collection) run end-to-end-ranking-expansion-terms.py:

python end-to-end-ranking-expansion-terms.py --query_id="301"  
    --output_dir=output_dir 
    --query_file=./data/robust/stopped_queries_lower.txt  
    --prf_docs_path=./data/robust/prfdocs.bm25/ 
    --run_file=./data/robust/robust_bm25.combined.run

Environment

Citation

If you find this paper/code useful, please cite:

@inproceedings{naseri2021ceqe,
  author    = {Shahrzad Naseri and
               Jeff Dalton and
               Andrew Yates and
               James Allan},
  title     = {{CEQE:} Contextualized Embeddings for Query Expansion},
  booktitle = {Advances in Information Retrieval - 43rd European Conference on {IR}
               Research, {ECIR} 2021, Virtual Event, March 28 - April 1, 2021, Proceedings,
               Part {I}},
  volume    = {12656},
  pages     = {467--482},
  publisher = {Springer},
  year      = {2021}
}