@overrides<EOL><INDENT>def __call__(self, batch: List[List[str]],<EOL>*args, **kwargs) -> Union[List[np.ndarray], np.ndarray]:<DEDENT>
if len(batch) > self.mini_batch_size:<EOL><INDENT>batch_gen = chunk_generator(batch, self.mini_batch_size)<EOL>elmo_output_values = []<EOL>for mini_batch in batch_gen:<EOL><INDENT>mini_batch_out = self._mini_batch_fit(mini_batch, *args, **kwargs)<EOL>elmo_output_values.extend(mini_batch_out)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>elmo_output_values = self._mini_batch_fit(batch, *args, **kwargs)<EOL><DEDENT>if self.pad_zero:<EOL><INDENT>elmo_output_values = zero_pad(elmo_output_values)<EOL><DEDENT>return elmo_output_values<EOL>
Embed sentences from a batch.

Args:
    batch: A list of tokenized text samples.

Returns:
    A batch of ELMo embeddings.