capreolus.reranker.POSITDRMM

Module Contents

Classes

POSITDRMM_basic

POSITDRMM_class

POSITDRMM

Ryan McDonald, George Brokos, and Ion Androutsopoulos. 2018. Deep Relevance Ranking Using Enhanced Document-Query Interactions. In EMNLP'18.

Attributes

logger

device

dtype

capreolus.reranker.POSITDRMM.logger[source]
capreolus.reranker.POSITDRMM.device[source]
class capreolus.reranker.POSITDRMM.POSITDRMM_basic(extractor, pipeline_config)[source]

Bases: torch.nn.Module

init_hidden(self)[source]
forward(self, sentence, query_sentence, query_idf, extra)[source]
class capreolus.reranker.POSITDRMM.POSITDRMM_class(extractor, config)[source]

Bases: torch.nn.Module

forward(self, query_sentence, query_idf, pos_sentence, neg_sentence, posdoc_extra, negdoc_extra)[source]
test_forward(self, query_sentence, query_idf, pos_sentence, extras)[source]
capreolus.reranker.POSITDRMM.dtype[source]
class capreolus.reranker.POSITDRMM.POSITDRMM(config=None, provide=None, share_dependency_objects=False, build=True)[source]

Bases: capreolus.reranker.Reranker

Ryan McDonald, George Brokos, and Ion Androutsopoulos. 2018. Deep Relevance Ranking Using Enhanced Document-Query Interactions. In EMNLP’18.

module_name = POSITDRMM[source]
dependencies[source]
build_model(self)[source]
score(self, data)[source]
test(self, data)[source]
zero_grad(self, *args, **kwargs)[source]
get_searcher_scores(self, qids, doc_ids)[source]
clean(self, text)[source]

Remove pad tokens from the text

get_bigrams(self, text)[source]
get_bigram_match_count(self, query, doc)[source]
get_exact_match_count(self, query, single_doc, query_idf)[source]
get_exact_match_stats(self, query_idf_batch, query_batch, doc_batch)[source]

The extra 4 features that must be combined to the relevant score. See https://www.aclweb.org/anthology/D18-1211.pdf section 4.1 beginning.