class_docstr: Trains a 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.
  
  For instantiated/pretrained models, see :class:`.Doc2VecModel`.
  
  For available pretrained models please see the `Models Hub <https://sparknlp.org/models>`__.
  
  ====================== =======================
  Input Annotation types Output Annotation type
  ====================== =======================
  ``TOKEN``              ``SENTENCE_EMBEDDINGS``
  ====================== =======================
  
  Parameters
  ----------
  vectorSize
      The dimension of codes after transforming from words (> 0), by default
      100
  windowSize
      The window size (context words from [-window, window]) (> 0), by default
      5
  numPartitions
      Number of partitions for sentences of words (> 0), by default 1
  minCount
      The minimum number of times a token must appear to be included in the
      word2vec model's vocabulary (>= 0), by default 1
  maxSentenceLength
      The window size (Maximum length (in words) of each sentence in the input
      data. Any sentence longer than this threshold will be divided into
      chunks up to the size (> 0), by default 1000
  stepSize
      Step size (learning rate) to be used for each iteration of optimization
      (> 0), by default 0.025
  maxIter
      Maximum number of iterations (>= 0), by default 1
  seed
      Random seed, by default 44
  
  
  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 = Doc2VecApproach() \
  ...     .setInputCols(["token"]) \
  ...     .setOutputCol("embeddings")
  >>> pipeline = Pipeline() \
  ...     .setStages([
  ...       documentAssembler,
  ...       tokenizer,
  ...       embeddings
  ...     ])
  >>> path = "sherlockholmes.txt"
  >>> dataset = spark.read.text(path).toDF("text")
  >>> pipelineModel = pipeline.fit(dataset)
docstr: Maximum length (in words) of each sentence in the input data.
  Any sentence longer than this threshold will be divided into
  chunks up to the size (> 0)
docstr_tok: ["Maximum","length","(","in","words",")","of","each","sentence","in","the","input","data",".","Any","sentence","longer","than","this","threshold","will","be","divided","into","chunks","up","to","the","size","(",">","0",")"]
code: def setMaxSentenceLength(self, maxSentenceLength):
      """
      Maximum length (in words) of each sentence in the input data.
      Any sentence longer than this threshold will be divided into
      chunks up to the size (> 0)
      """
      return self._set(maxSentenceLength=maxSentenceLength)
  
imports: from sparknlp.common import *
label_desc: Use image node_id 8 for calling the Doc2VecApproach obj's underlying member method code with example usage: obj.setMaxSentenceLength(maxSentenceLength) and returns: self