Skip to content

edsnlp.scorers.ner

ner_exact_scorer

Scores the extracted entities that may be overlapping or nested by looking in the spans returned by a given SpanGetter object.

Parameters

PARAMETER DESCRIPTION
examples

The examples to score

TYPE: Iterable[Example]

span_getter

The span getter to use to extract the spans from the document

TYPE: SpanGetter

micro_key

The key to use to store the micro-averaged results for spans of all types

TYPE: str DEFAULT: 'micro'

RETURNS DESCRIPTION
Dict[str, Any]

ner_token_scorer

Scores the extracted entities that may be overlapping or nested by looking in doc.ents, and doc.spans, and comparing the predicted and gold entities at the TOKEN level.

Parameters

PARAMETER DESCRIPTION
examples

The examples to score

TYPE: Iterable[Example]

span_getter

The span getter to use to extract the spans from the document

TYPE: SpanGetter

micro_key

The key to use to store the micro-averaged results for spans of all types

TYPE: str DEFAULT: 'micro'

RETURNS DESCRIPTION
Dict[str, Any]