class_docstr: Word2Vec model that creates vector representations of words in a text
  corpus.
  
  The algorithm first constructs a vocabulary from the corpus and then learns
  vector representation of words in the vocabulary. The vector representation
  can be used as features in natural language processing and machine learning
  algorithms.
  
  We use Word2Vec implemented in Spark ML. It uses skip-gram model in our
  implementation and a hierarchical softmax method to train the model. The
  variable names in the implementation match the original C implementation.
  
  This is the instantiated model of the :class:`.Word2VecApproach`. For
  training your own model, please see the documentation of that class.
  
  Pretrained models can be loaded with :meth:`.pretrained` of the companion
  object:
  
  >>> embeddings = Word2VecModel.pretrained() \
  ...     .setInputCols(["token"]) \
  ...     .setOutputCol("embeddings")
  
  The default model is `"word2vec_gigaword_300"`, if no name is provided.
  
  ====================== =======================
  Input Annotation types Output Annotation type
  ====================== =======================
  ``TOKEN``              ``WORD_EMBEDDINGS``
  ====================== =======================
  
  Parameters
  ----------
  vectorSize
      The dimension of codes after transforming from words (> 0), by default
      100
  
  References
  ----------
  For the original C implementation, see https://code.google.com/p/word2vec/
  
  For the research paper, see `Efficient Estimation of Word Representations in
  Vector Space <https://arxiv.org/abs/1301.3781>`__ and `Distributed
  Representations of Words and Phrases and their Compositionality
  <https://arxiv.org/pdf/1310.4546v1.pdf>`__.
  
  Examples
  --------
  >>> import sparknlp
  >>> from sparknlp.base import *
  >>> from sparknlp.annotator import *
  >>> from pyspark.ml import Pipeline
  >>> documentAssembler = DocumentAssembler() \
  ...     .setInputCol("text") \
  ...     .setOutputCol("document")
  >>> tokenizer = Tokenizer() \
  ...     .setInputCols(["document"]) \
  ...     .setOutputCol("token")
  >>> embeddings = Word2VecModel.pretrained() \
  ...     .setInputCols(["token"]) \
  ...     .setOutputCol("embeddings")
  >>> embeddingsFinisher = EmbeddingsFinisher() \
  ...     .setInputCols(["embeddings"]) \
  ...     .setOutputCols("finished_embeddings") \
  ...     .setOutputAsVector(True)
  >>> pipeline = Pipeline().setStages([
  ...     documentAssembler,
  ...     tokenizer,
  ...     embeddings,
  ...     embeddingsFinisher
  ... ])
  >>> data = spark.createDataFrame([["This is a sentence."]]).toDF("text")
  >>> result = pipeline.fit(data).transform(data)
  >>> result.selectExpr("explode(finished_embeddings) as result").show(1, 80)
  +--------------------------------------------------------------------------------+
  |                                                                          result|
  +--------------------------------------------------------------------------------+
  |[0.06222493574023247,0.011579325422644615,0.009919632226228714,0.109361454844...|
  +--------------------------------------------------------------------------------+
docstr: Downloads and loads a pretrained model.
  
  Parameters
  ----------
  name : str, optional
      Name of the pretrained model, by default "word2vec_wiki"
  lang : str, optional
      Language of the pretrained model, by default "en"
  remote_loc : str, optional
      Optional remote address of the resource, by default None. Will use
      Spark NLPs repositories otherwise.
  
  Returns
  -------
  Word2VecModel
      The restored model
docstr_tok: ["Downloads","and","loads","a","pretrained","model",".","Parameters","--","--","--","--","--","name",":","str",",","optional","Name","of","the","pretrained","model",",","by","default","``","word2vec_wiki","''","lang",":","str",",","optional","Language","of","the","pretrained","model",",","by","default","``","en","''","remote_loc",":","str",",","optional","Optional","remote","address","of","the","resource",",","by","default","None",".","Will","use","Spark","NLPs","repositories","otherwise",".","Returns","--","--","--","-","Word2VecModel","The","restored","model"]
code: def pretrained(
      name="word2vec_gigaword_300", lang="en", remote_loc=None
  ):
      """Downloads and loads a pretrained model.
  
      Parameters
      ----------
      name : str, optional
          Name of the pretrained model, by default "word2vec_wiki"
      lang : str, optional
          Language of the pretrained model, by default "en"
      remote_loc : str, optional
          Optional remote address of the resource, by default None. Will use
          Spark NLPs repositories otherwise.
  
      Returns
      -------
      Word2VecModel
          The restored model
      """
      from sparknlp.pretrained import ResourceDownloader
  
      return ResourceDownloader.downloadModel(
          Word2VecModel, name, lang, remote_loc
      )
  
imports: from sparknlp.common import *
label_desc: Use image node_id 3 for calling the Word2VecModel obj's underlying member method code with example usage: obj.pretrained(name, lang, remote_loc) and returns: ResourceDownloader