capreolus.index.anserini

Module Contents

Classes

AnseriniIndex

Base class for Index modules. The purpose of an Index module is to represent an inverted index that can be queried with a Searcher module and used to obtain documents and collection statistics.

Attributes

logger

MAX_THREADS

capreolus.index.anserini.logger[source]
capreolus.index.anserini.MAX_THREADS[source]
class capreolus.index.anserini.AnseriniIndex(config=None, provide=None, share_dependency_objects=False, build=True)[source]

Bases: capreolus.index.Index

Base class for Index modules. The purpose of an Index module is to represent an inverted index that can be queried with a Searcher module and used to obtain documents and collection statistics.

Modules should provide:
  • a _create_index method that creates an index on the Collection dependency

  • a get_doc(docid) and a get_docs(docid) method

  • a get_df(term) method

module_name = 'anserini'[source]
config_spec[source]
get_docs(doc_ids)[source]
get_doc(docid)[source]
get_df(term)[source]
get_idf(term)[source]

BM25’s IDF with a floor of 0

open()[source]