class_docstr: A ``TokenIndexer`` determines how string tokens get represented as arrays of indices in a model.
  This class both converts strings into numerical values, with the help of a
  :class:`~allennlp.data.vocabulary.Vocabulary`, and it produces actual arrays.
  
  Tokens can be represented as single IDs (e.g., the word "cat" gets represented by the number
  34), or as lists of character IDs (e.g., "cat" gets represented by the numbers [23, 10, 18]),
  or in some other way that you can come up with (e.g., if you have some structured input you
  want to represent in a special way in your data arrays, you can do that here).
docstr: The :class:`Vocabulary` needs to assign indices to whatever strings we see in the training
  data (possibly doing some frequency filtering and using an OOV, or out of vocabulary,
  token).  This method takes a token and a dictionary of counts and increments counts for
  whatever vocabulary items are present in the token.  If this is a single token ID
  representation, the vocabulary item is likely the token itself.  If this is a token
  characters representation, the vocabulary items are all of the characters in the token.
code: def count_vocab_items(self, token, counter):
      """
      The :class:`Vocabulary` needs to assign indices to whatever strings we see in the training
      data (possibly doing some frequency filtering and using an OOV, or out of vocabulary,
      token).  This method takes a token and a dictionary of counts and increments counts for
      whatever vocabulary items are present in the token.  If this is a single token ID
      representation, the vocabulary item is likely the token itself.  If this is a token
      characters representation, the vocabulary items are all of the characters in the token.
      """
      raise NotImplementedError
  
file_path: magnitude/pymagnitude/third_party/allennlp/data/token_indexers/token_indexer.py
imports: from __future__ import absolute_import
  from allennlp.common import Registrable
  from allennlp.data.tokenizers.token import Token
  from allennlp.data.vocabulary import Vocabulary
label_desc: Use image node_id 1 for calling the TokenIndexer obj's underlying member method code with example usage: obj.count_vocab_items(token, counter) without return types