Skip to content

Span Pooler

The eds.span_pooler component is a trainable span embedding component. It generates span embeddings from a word embedding component and a span getter. It can be used to train a span classifier, as in eds.span_classifier.

Parameters

PARAMETER DESCRIPTION
nlp

Spacy vocabulary

TYPE: Optional[PipelineProtocol]

name

Name of the component

TYPE: str

embedding

The word embedding component

TYPE: WordEmbeddingComponent

span_getter

How to extract the candidate spans and the qualifiers to predict or train on.

TYPE: SpanGetterArg

pooling_mode

How word embeddings are aggregated into a single embedding per span.

TYPE: Literal['max', 'sum', 'mean'] DEFAULT: mean

projection_mode

How embeddings converted into logits

TYPE: Literal['dot'] DEFAULT: dot