An Example holds the information for one training instance. It stores two
Doc objects: one for holding the gold-standard reference data, and one for
holding the predictions of the pipeline. An
Alignment object stores the alignment between
these two documents, as they can differ in tokenization.
Get the aligned view of the dependency parse. If projectivize is set to
True, non-projective dependency trees are made projective through the
Pseudo-Projective Dependency Parsing algorithm by Nivre and Nilsson (2005).
Whether or not to projectivize the dependency trees. Defaults to True. bool
List of integer values, or string values if as_string is True. Union[List[int], List[str]]
Get the aligned view of any set of Span objects defined over
Example.predicted. The resulting span indices will
align to the tokenization in Example.reference. This
method is particularly useful to assess the accuracy of predicted entities
against the original gold-standard annotation.
Span objects aligned to the tokenization of predicted. Iterable[Span]
Whether the resulting Span objects may overlap or not. Set to False by default. bool
Span objects aligned to the tokenization of reference. List[Span]