Skip to content

Span Pooler[source]

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

The pipeline object

name

Name of the component

embedding

The word embedding component

TYPE: WordEmbeddingComponent

pooling_mode

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

DEFAULT: mean

hidden_size

The size of the hidden layer. If None, no projection is done and the output of the span pooler is used directly.

TYPE: Optional[int] DEFAULT: None