token_embedders: Dict[str, allennlp.modules.token_embedders.token_embedder.TokenEmbedder],
) -> None

This is a TextFieldEmbedder that wraps a collection of TokenEmbedder objects. Each TokenEmbedder embeds or encodes the representation output from one As the data produced by a is a dictionary mapping names to these representations, we take TokenEmbedders with corresponding names. Each TokenEmbedders embeds its input, and the result is concatenated in an arbitrary (but consistent) order.

Registered as a TextFieldEmbedder with name "basic", which is also the default.


  • token_embedders : Dict[str, TokenEmbedder], required. A dictionary mapping token embedder names to implementations. These names should match the corresponding indexer used to generate the tensor passed to the TokenEmbedder.


BasicTextFieldEmbedder.get_output_dim(self) -> int

Returns the dimension of the vector representing each token in the output of this TextFieldEmbedder. This is not the shape of the returned tensor, but the last element of that shape.