segram.nlp.extensions.base module

Default spacy extension backend.

class segram.nlp.extensions.base.SpacyExtensions(doc: type[Doc], span: type[Span], token: type[Token], alias: str)[source]

Bases: object

Backend providing implementations of base custom spacy extensions attributes.

doc

Enhanced document type.

span

Enhanced span type.

token

Enhanced token type.

attributes

Specification of extension attributes to register.

alias

segram alias.

register() None[source]

Initialize extensions.