debeir.rankers.reranking.use
1from debeir.rankers.reranking.nir import NIReRanker 2 3 4class USEReRanker(NIReRanker): 5 """ 6 Re-ranks based on the cosine_sum rather the complete NIR scoring 7 """ 8 9 def __init__(self, *args, **kwargs): 10 super().__init__(*args, **kwargs) 11 12 def _compute_scores(self, document): 13 if not self.pre_calc_finished: 14 self._compute_scores_helper() 15 16 return self.pre_calc[document.doc_id]["cosine_sum"]
5class USEReRanker(NIReRanker): 6 """ 7 Re-ranks based on the cosine_sum rather the complete NIR scoring 8 """ 9 10 def __init__(self, *args, **kwargs): 11 super().__init__(*args, **kwargs) 12 13 def _compute_scores(self, document): 14 if not self.pre_calc_finished: 15 self._compute_scores_helper() 16 17 return self.pre_calc[document.doc_id]["cosine_sum"]
Re-ranks based on the cosine_sum rather the complete NIR scoring