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:`.Doc2VecApproach`. 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 = Doc2VecModel.pretrained() \
  ...     .setInputCols(["token"]) \
  ...     .setOutputCol("embeddings")
  
  The default model is `"doc2vec_gigaword_300"`, if no name is provided.
  
  ====================== =======================
  Input Annotation types Output Annotation type
  ====================== =======================
  ``TOKEN``              ``SENTENCE_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 = Doc2VecModel.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: Sets vector size (default: 100).
docstr_tok: ["Sets","vector","size","(","default",":","100",")","."]
code: def setVectorSize(self, vectorSize):
      """
      Sets vector size (default: 100).
      """
      return self._set(vectorSize=vectorSize)
  
imports: from sparknlp.common import *
label_desc: Use image node_id 1 for calling the Doc2VecModel obj's underlying member method code with example usage: obj.setVectorSize(vectorSize) and returns: self