veil.entity_detectors.gliner

class veil.entity_detectors.gliner.GlinerEntityDetector(config)[source]

Bases: BaseEntityDetector[GlinerEntityType]

Adapter over Gliner entity detection models with support for chunking long documents.

Parameters:

config (GlinerEntityDetectorConfig)

ENTITY_TYPES: Set[E] = {GlinerEntityType.NAME, GlinerEntityType.COMPANY, GlinerEntityType.ADDRESS}
detect_entities(doc)[source]

Detect entities in the document using GLiNER model with chunking support.

Long documents are automatically split into overlapping chunks to handle the model’s maximum sequence length limitation.

Parameters:

doc (Document) – Document to process

Returns:

List of Span objects with detected entities

Return type:

List[Span]