:mod:`capreolus.reranker.POSITDRMM` =================================== .. py:module:: capreolus.reranker.POSITDRMM Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: capreolus.reranker.POSITDRMM.POSITDRMM_basic capreolus.reranker.POSITDRMM.POSITDRMM_class capreolus.reranker.POSITDRMM.POSITDRMM .. data:: logger .. data:: device .. py:class:: POSITDRMM_basic(extractor, pipeline_config) Bases: :class:`torch.nn.Module` .. method:: init_hidden(self) .. method:: forward(self, sentence, query_sentence, query_idf, extra) .. py:class:: POSITDRMM_class(extractor, config) Bases: :class:`torch.nn.Module` .. method:: forward(self, query_sentence, query_idf, pos_sentence, neg_sentence, posdoc_extra, negdoc_extra) .. method:: test_forward(self, query_sentence, query_idf, pos_sentence, extras) .. data:: dtype .. py:class:: POSITDRMM Bases: :class:`capreolus.reranker.Reranker` .. attribute:: description :annotation: = Ryan McDonald, George Brokos, and Ion Androutsopoulos. 2018. Deep Relevance Ranking Using Enhanced Document-Query Interactions. In EMNLP'18. .. attribute:: module_name :annotation: = POSITDRMM .. method:: build_model(self) .. method:: score(self, data) .. method:: test(self, data) .. method:: zero_grad(self, *args, **kwargs) .. method:: get_searcher_scores(self, qids, doc_ids) .. method:: clean(self, text) Remove pad tokens from the text .. method:: get_bigrams(self, text) .. method:: get_bigram_match_count(self, query, doc) .. method:: get_exact_match_count(self, query, single_doc, query_idf) .. method:: get_exact_match_stats(self, query_idf_batch, query_batch, doc_batch) 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.