class_docstr: Defines a vocabulary object that will be used to numericalize a field.
  
  Attributes:
      freqs: A collections.Counter object holding the frequencies of tokens
          in the data used to build the Vocab.
      stoi: A collections.defaultdict instance mapping token strings to
          numerical identifiers.
      itos: A list of token strings indexed by their numerical identifiers.
class_docstr_tok: ["Defines","a","vocabulary","object","that","will","be","used","to","numericalize","a","field",".","Attributes",":","freqs",":","A","collections.Counter","object","holding","the","frequencies","of","tokens","in","the","data","used","to","build","the","Vocab",".","stoi",":","A","collections.defaultdict","instance","mapping","token","strings","to","numerical","identifiers",".","itos",":","A","list","of","token","strings","indexed","by","their","numerical","identifiers","."]
docstr: Args:
      vectors: one of or a list containing instantiations of the
          GloVe, CharNGram, or Vectors classes. Alternatively, one
          of or a list of available pretrained vectors:
  
          charngram.100d
          fasttext.en.300d
          fasttext.simple.300d
          glove.42B.300d
          glove.840B.300d
          glove.twitter.27B.25d
          glove.twitter.27B.50d
          glove.twitter.27B.100d
          glove.twitter.27B.200d
          glove.6B.50d
          glove.6B.100d
          glove.6B.200d
          glove.6B.300d
  
      Remaining keyword arguments: Passed to the constructor of Vectors classes.
docstr_tok: ["Args",":","vectors",":","one","of","or","a","list","containing","instantiations","of","the","GloVe",",","CharNGram",",","or","Vectors","classes",".","Alternatively",",","one","of","or","a","list","of","available","pretrained","vectors",":","charngram.100d","fasttext.en.300d","fasttext.simple.300d","glove.42B.300d","glove.840B.300d","glove.twitter.27B.25d","glove.twitter.27B.50d","glove.twitter.27B.100d","glove.twitter.27B.200d","glove.6B.50d","glove.6B.100d","glove.6B.200d","glove.6B.300d","Remaining","keyword","arguments",":","Passed","to","the","constructor","of","Vectors","classes","."]
code: def load_vectors(self, vectors, **kwargs):
      """
      Args:
          vectors: one of or a list containing instantiations of the
              GloVe, CharNGram, or Vectors classes. Alternatively, one
              of or a list of available pretrained vectors:
  
              charngram.100d
              fasttext.en.300d
              fasttext.simple.300d
              glove.42B.300d
              glove.840B.300d
              glove.twitter.27B.25d
              glove.twitter.27B.50d
              glove.twitter.27B.100d
              glove.twitter.27B.200d
              glove.6B.50d
              glove.6B.100d
              glove.6B.200d
              glove.6B.300d
  
          Remaining keyword arguments: Passed to the constructor of Vectors classes.
      """
      if not isinstance(vectors, list):
          vectors = [vectors]
      for idx, vector in enumerate(vectors):
          if isinstance(vector, str):
              # Convert the string pretrained vector identifier
              # to a Vectors object
              if vector not in pretrained_aliases:
                  raise ValueError(
                      "Got string input vector {}, but allowed pretrained "
                      "vectors are {}".format(
                          vector, list(pretrained_aliases.keys())
                      )
                  )
              vectors[idx] = pretrained_aliases[vector](**kwargs)
          elif not isinstance(vector, Vectors):
              raise ValueError(
                  "Got input vectors of type {}, expected str or "
                  "Vectors object".format(type(vector))
              )
  
      tot_dim = sum(v.dim for v in vectors)
      self.vectors = torch.Tensor(len(self), tot_dim)
      for i, token in enumerate(self.itos):
          start_dim = 0
          for v in vectors:
              end_dim = start_dim + v.dim
              self.vectors[i][start_dim:end_dim] = v[token.strip()]
              start_dim = end_dim
          assert start_dim == tot_dim
  
file_path: pytext/pytext/legacy/vocab.py
imports: import logging
  from collections import Counter, defaultdict
  import torch
  from torchtext.vocab import pretrained_aliases, Vectors
  from tqdm import tqdm
label_desc: Use image node_id 10 for calling the Vocab obj's underlying member method code with example usage: obj.load_vectors(vectors) without return types