class_docstr: Convert a token to an array of character ids to compute ELMo representations.
  
  Registered as a `TokenIndexer` with name "elmo_characters".
  
  # Parameters
  
  namespace : `str`, optional (default=`elmo_characters`)
  tokens_to_add : `Dict[str, int]`, optional (default=`None`)
      If not None, then provides a mapping of special tokens to character
      ids. When using pre-trained models, then the character id must be
      less then 261, and we recommend using un-used ids (e.g. 1-32).
  token_min_padding_length : `int`, optional (default=`0`)
      See :class:`TokenIndexer`.
class_docstr_tok: ["Convert","a","token","to","an","array","of","character","ids","to","compute","ELMo","representations",".","Registered","as","a","`","TokenIndexer","`","with","name","``","elmo_characters","''",".","#","Parameters","namespace",":","`","str","`",",","optional","(","default=","`","elmo_characters","`",")","tokens_to_add",":","`","Dict","[","str",",","int","]","`",",","optional","(","default=","`","None","`",")","If","not","None",",","then","provides","a","mapping","of","special","tokens","to","character","ids",".","When","using","pre-trained","models",",","then","the","character","id","must","be","less","then","261",",","and","we","recommend","using","un-used","ids","(","e.g",".","1-32",")",".","token_min_padding_length",":","`","int","`",",","optional","(","default=","`","0","`",")","See",":","class",":","`","TokenIndexer","`","."]
code: def as_padded_tensor_dict(
      self, tokens: IndexedTokenList, padding_lengths: Dict[str, int]
  ) -> Dict[str, torch.Tensor]:
      # Overriding this method only because we need a different padding token than the default.
      tensor_dict = {}
  
      def padding_token():
          return [0] * ELMoCharacterMapper.max_word_length
  
      tensor_dict["elmo_tokens"] = torch.LongTensor(
          pad_sequence_to_length(
              tokens["elmo_tokens"],
              padding_lengths["elmo_tokens"],
              default_value=padding_token,
          )
      )
      return tensor_dict
  
file_path: allennlp/allennlp/data/token_indexers/elmo_indexer.py
imports: from typing import Dict, List
  import torch
  from allennlp.common.util import pad_sequence_to_length
  from allennlp.data.tokenizers import Token
  from allennlp.data.token_indexers.token_indexer import TokenIndexer, IndexedTokenList
  from allennlp.data.vocabulary import Vocabulary
label_desc: Use image node_id 5 for calling the ELMoTokenCharactersIndexer obj's underlying member method code with example usage: obj.as_padded_tensor_dict(tokens, padding_lengths) and returns: tensor_dict, unknown