nordlys.logic.fusion.late_fusion_scorer module

Late Fusion Scorer

Class for late fusion scorer (i.e., document-centric model).

Authors:Shuo Zhang, Krisztian Balog, Dario Garigliotti
class nordlys.logic.fusion.late_fusion_scorer.LateFusionScorer(index_name, retr_model, retr_params, num_docs=None, field='content', run_id='fusion', num_objs=100, assoc_mode=1, assoc_file=None)[source]

Bases: nordlys.logic.fusion.fusion_scorer.FusionScorer

Parameters:
  • index_name – name of index
  • assoc_file – document-object association file
  • assoc_mode – document-object weight mode, uniform or binary
  • retr_model – the retrieval model; valid values: “lm”, “bm25”
  • retr_params – config including smoothing method and parameter
  • num_objs – the number of ranked objects for a query
  • assoc_mode – the fusion weights, which could be binary or uniform
  • assoc_file – object-doc association file
score_query(query, assoc_fun=None)[source]

Scores a given query.

Parameters:query – query string.
Returns:a RetrievalResults instance.
Func assoc_fun:function to return a list of docs for an obeject