nordlys.logic.fusion.fusion_scorer module

Fusion Scorer

Abstract class for fusion-based scoring.

Authors:Shuo Zhang, Krisztian Balog, Dario Garigliotti
class nordlys.logic.fusion.fusion_scorer.FusionScorer(index_name, association_file=None, run_id='fusion')[source]

Bases: object

Parameters:
  • index_name – name of index
  • association_file – association file
ASSOC_MODE_BINARY = 1
ASSOC_MODE_UNIFORM = 2

Abstract class for any fusion-based method.

load_associations()[source]

Loads the document-object associations.

load_queries(query_file)[source]

Loads the query file :return: query dictionary {queryID:query([term1,term2,…])}

score_queries(queries, output_file)[source]

Scores all queries and optionally dumps results into an output file.

score_query(query, assoc_fun=None)[source]