Table of Contents

Constructor NamedEntityRecognition

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

NamedEntityRecognition(LM)

Initializes a new instance of NamedEntityRecognition with default entity definitions (all built‐in NamedEntityRecognition.NamedEntityType values except Custom).

public NamedEntityRecognition(LM model)

Parameters

model LM

A valid LM model that is not an embedding‐only model and has tensor weights loaded.

Exceptions

ArgumentNullException

Thrown if model is null.

InvalidModelException

Thrown if model is an embedding model or was loaded without weights.

NamedEntityRecognition(LM, List<EntityDefinition>)

Initializes a new instance of NamedEntityRecognition with a custom list of entity definitions.

public NamedEntityRecognition(LM model, List<NamedEntityRecognition.EntityDefinition> definitions)

Parameters

model LM

A valid LM model that is not an embedding‐only model and has tensor weights loaded.

definitions List<NamedEntityRecognition.EntityDefinition>

The list of NamedEntityRecognition.EntityDefinition items (built‐in or custom) that this recognizer will extract. Must be non-null and contain at least one item.

Exceptions

ArgumentNullException

Thrown if model is null or definitions is null/empty.

InvalidModelException

Thrown if model is an embedding model or was loaded without weights.