primeqa.mrc.processors.postprocessors.scorers.initialize_scorer#

primeqa.mrc.processors.postprocessors.scorers.initialize_scorer(scorer_type: Union[str, primeqa.mrc.processors.postprocessors.scorers.SupportedSpanScorers], target_type_weight: Optional[float] = 0.5) Callable#

Factory method to initialize scorer.

Parameters
  • scorer_type – Which scoring algorithm to use.

  • target_type_weight – How much weight [0-1] to put on target type logits vs start/end logits.

Returns

Initialized scorer.