.evaluate#

class tieval.evaluate.Span(start: int, end: int)#

Bases: object

An annotation span build to check if two entities overlap.

.metrics module#

tieval.evaluate.metrics.temporal_awareness(prediction: Set[TLink], annotation: Set[TLink]) float#

Compute the temporal awareness of a system.

Temporal awareness is a f1 measure that takes into account the temporal closure of a system. For more information refer to the original paper.

Parameters:
  • prediction (Set[TLink]) – The TLinks predicted by the system.

  • annotation (Set[TLink]) – The reference TLinks.

tieval.evaluate.metrics.temporal_precision(prediction: Set[TLink], annotation: Set[TLink]) Tuple[int, int]#

Compute precision by taking into account the temporal closure of the annotations.

Parameters:
  • prediction (Set[TLink]) – The TLinks predicted by the system.

  • annotation (Set[TLink]) – The reference TLinks.

tieval.evaluate.metrics.temporal_recall(prediction: Set[TLink], annotation: Set[TLink]) Tuple[int, int]#

Compute recall by taking into account the temporal closure of the predictions.

Parameters:
  • prediction (Set[TLink]) – The TLinks predicted by the system.

  • annotation (Set[TLink]) – The reference TLinks.