Table of Contents

Class EntityAnnotation

Namespace
LMKit.TextAnalysis.Training
Assembly
LM-Kit.NET.dll

Ground-truth annotation for a single entity, used when building training datasets for entity extraction tasks (e.g., NER, PII).

public sealed class EntityAnnotation
Inheritance
EntityAnnotation
Inherited Members

Examples

var ann = new EntityAnnotation("PERSON", "Alice Martin");

Remarks

This type pairs an entity Label with a representative Text value. Use this when character offsets/spans are not required. If you later need offsets, consider introducing a sibling type (e.g., SpanEntityAnnotation) that adds Start/Length. Instances are immutable after construction and safe to share across threads.

Constructors

EntityAnnotation(string, string)

Creates a new EntityAnnotation.

Properties

Label

The string key/name for the entity type. For built-in types, use EntityType.ToString(); for custom types, use the user-defined label (e.g., "AccountNumber").

Text

Canonical or representative text for this entity (e.g., the mention string or a normalized value such as a cleaned phone number).

Methods

Deconstruct(out string, out string)

Deconstructs this annotation into its label and text.