class_docstr: This :class:`SpacyTokenIndexer` represents tokens as word vectors
  from a spacy model. You might want to do this for two main reasons;
  easier integration with a spacy pipeline and no out of vocabulary
  tokens.
  
  Registered as a `TokenIndexer` with name "spacy".
  
  # Parameters
  
  hidden_dim : `int`, optional (default=`96`)
      The dimension of the vectors that spacy generates for
      representing words.
  token_min_padding_length : `int`, optional (default=`0`)
      See :class:`TokenIndexer`.
class_docstr_tok: ["This",":","class",":","`","SpacyTokenIndexer","`","represents","tokens","as","word","vectors","from","a","spacy","model",".","You","might","want","to","do","this","for","two","main","reasons",";","easier","integration","with","a","spacy","pipeline","and","no","out","of","vocabulary","tokens",".","Registered","as","a","`","TokenIndexer","`","with","name","``","spacy","''",".","#","Parameters","hidden_dim",":","`","int","`",",","optional","(","default=","`","96","`",")","The","dimension","of","the","vectors","that","spacy","generates","for","representing","words",".","token_min_padding_length",":","`","int","`",",","optional","(","default=","`","0","`",")","See",":","class",":","`","TokenIndexer","`","."]
code: def __init__(
      self, hidden_dim: int = 96, token_min_padding_length: int = 0
  ) -> None:
      self._hidden_dim = hidden_dim
      super().__init__(token_min_padding_length)
  
file_path: allennlp/allennlp/data/token_indexers/spacy_indexer.py
imports: from typing import Dict, List
  from spacy.tokens import Token
  import torch
  import numpy
  from allennlp.common.util import pad_sequence_to_length
  from allennlp.data.vocabulary import Vocabulary
  from allennlp.data.tokenizers import Token
  from allennlp.data.token_indexers.token_indexer import TokenIndexer, IndexedTokenList
label_desc: Use image node_id 1 to create a new SpacyTokenIndexer object from inherited base classes: TokenIndexer with example: obj = SpacyTokenIndexer(hidden_dim, token_min_padding_length)