primeqa.mrc.metrics.tydi_f1.eval_utils.nonnull_span_equal#

primeqa.mrc.metrics.tydi_f1.eval_utils.nonnull_span_equal(span_a, span_b)#

Given two spans, return if they are equal.

This is used for scoring only passage answers. See compute_partial_match_scores for minimal answers.

Parameters
  • span_a – a Span object.

  • span_b – a Span object. Only compare non-null spans. First, if the bytes are not negative, compare byte offsets.

Returns

True or False