primeqa.mrc.metrics.nq_f1.eval_utils.nonnull_span_equal#

primeqa.mrc.metrics.nq_f1.eval_utils.nonnull_span_equal(span_a: primeqa.mrc.metrics.nq_f1.eval_utils.NQSpan, span_b: primeqa.mrc.metrics.nq_f1.eval_utils.NQSpan)#

Given two spans, return if they are equal.

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, Otherwise, compare token offsets.

Returns

True or False