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: Arguments:
      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
docstr_tok: ["Arguments",":","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"]
code: def load_vectors(self, vectors, cat=True):
      """
      Arguments:
          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
      """
      if not isinstance(vectors, list):
          vectors = [vectors]
      for idx, vector in enumerate(vectors):
          if six.PY2 and isinstance(vector, str):
              vector = six.text_type(vector)
          if isinstance(vector, six.string_types):
              # 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]()
          elif not isinstance(vector, Vectors):
              raise ValueError(
                  "Got input vectors of type {}, expected str or "
                  "Vectors object".format(type(vector))
              )
  
      if cat:
          tot_dim = sum(v.dim for v in vectors)
          self.vectors = torch.Tensor(len(self), tot_dim)
          for ti, token in enumerate(self.itos):
              start_dim = 0
              for v in vectors:
                  end_dim = start_dim + v.dim
                  self.vectors[ti][start_dim:end_dim] = v[token.strip()]
                  start_dim = end_dim
              assert start_dim == tot_dim
      else:
          self.vectors = [
              torch.Tensor(len(self), v.dim) for v in vectors
          ]
          for ti, t in enumerate(self.itos):
              for vi, v in enumerate(vectors):
                  self.vectors[vi][ti] = v[t.strip()]
  
imports: from __future__ import unicode_literals
  import array
  from collections import defaultdict
  import io
  import logging
  import os
  import zipfile
  import six
  from six.moves.urllib.request import urlretrieve
  import torch
  from tqdm import tqdm
  import tarfile
  from .utils import reporthook
label_desc: Use image node_id 5 for calling the Vocab obj's underlying member method code with example usage: obj.load_vectors(vectors, cat) without return types