Understand NER evaluation scenarios and schemas
mainUnlike simple token-level evaluation, nervaluate uses entity-level evaluation to account for multi-token entities. It categorizes errors into five types:
- Correct (COR): Both boundaries and type match.
- Incorrect (INC): Output and gold annotation do not match.
- Partial (PAR): Boundaries are somewhat similar but not identical.
- Missing (MIS): A gold annotation is not captured by the system.
- Spurious (SPU): The system produces an entity that doesn't exist in the gold annotation.
These are measured using four evaluation schemas:
- Strict: Requires exact boundary match AND exact entity type.
- Exact: Requires exact boundary match, regardless of type.
- Partial: Allows partial boundary match, regardless of type.
- Type: Requires some overlap between the system tagged entity and the gold annotation.
Precision, recall, and F1-score are calculated differently depending on whether you are using an Exact Match schema (Strict, Exact) or a Partial Match schema (Partial, Type).