class_docstr: Word Embeddings lookup annotator that maps tokens to vectors
  
  This is the instantiated model of :class:`.WordEmbeddings`.
  
  Pretrained models can be loaded with :meth:`.pretrained` of the companion
  object:
  
  >>> embeddings = WordEmbeddingsModel.pretrained() \
  ...       .setInputCols(["document", "token"]) \
  ...       .setOutputCol("embeddings")
  
  The default model is ``"glove_100d"``, if no name is provided. For available
  pretrained models please see the `Models Hub
  <https://sparknlp.org/models?task=Embeddings>`__.
  
  For extended examples of usage, see the `Examples <https://github.com/JohnSnowLabs/spark-nlp/blob/master/examples/python/quick_start_offline.ipynb>`__.
  
  ====================== ======================
  Input Annotation types Output Annotation type
  ====================== ======================
  ``DOCUMENT, TOKEN``    ``WORD_EMBEDDINGS``
  ====================== ======================
  
  Parameters
  ----------
  dimension
      Number of embedding dimensions
  readCacheSize
      Cache size for items retrieved from storage. Increase for performance
      but higher memory consumption
  
  Notes
  -----
  There are also two convenient functions to retrieve the embeddings coverage
  with respect to the transformed dataset:
  
  - :meth:`.withCoverageColumn`: Adds a custom
    column with word coverage stats for the embedded field. This creates
    a new column with statistics for each row.
  - :meth:`.overallCoverage`: Calculates overall word
    coverage for the whole data in the embedded field. This returns a single
    coverage object considering all rows in the field.
  
  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 = WordEmbeddingsModel.pretrained() \
  ...     .setInputCols(["document", "token"]) \
  ...     .setOutputCol("embeddings")
  >>> embeddingsFinisher = EmbeddingsFinisher() \
  ...     .setInputCols(["embeddings"]) \
  ...     .setOutputCols("finished_embeddings") \
  ...     .setOutputAsVector(True) \
  ...     .setCleanAnnotations(False)
  >>> 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(5, 80)
  +--------------------------------------------------------------------------------+
  |                                                                          result|
  +--------------------------------------------------------------------------------+
  |[-0.570580005645752,0.44183000922203064,0.7010200023651123,-0.417129993438720...|
  |[-0.542639970779419,0.4147599935531616,1.0321999788284302,-0.4024400115013122...|
  |[-0.2708599865436554,0.04400600120425224,-0.020260000601410866,-0.17395000159...|
  |[0.6191999912261963,0.14650000631809235,-0.08592499792575836,-0.2629800140857...|
  |[-0.3397899866104126,0.20940999686717987,0.46347999572753906,-0.6479200124740...|
  +--------------------------------------------------------------------------------+
  
  See Also
  --------
  SentenceEmbeddings : to combine embeddings into a sentence-level representation
class_docstr_tok: ["Word","Embeddings","lookup","annotator","that","maps","tokens","to","vectors","This","is","the","instantiated","model","of",":","class",":","`",".WordEmbeddings","`",".","Pretrained","models","can","be","loaded","with",":","meth",":","`",".pretrained","`","of","the","companion","object",":",">",">",">","embeddings","=","WordEmbeddingsModel.pretrained","(",")","\\","...",".setInputCols","(","[","``","document","''",",","``","token","''","]",")","\\","...",".setOutputCol","(","``","embeddings","''",")","The","default","model","is","``","``","glove_100d","''","``",",","if","no","name","is","provided",".","For","available","pretrained","models","please","see","the","`","Models","Hub","<","https",":","\/\/sparknlp.org\/models","?","task=Embeddings",">","`","__",".","For","extended","examples","of","usage",",","see","the","`","Examples","<","https",":","\/\/github.com\/JohnSnowLabs\/spark-nlp\/blob\/master\/examples\/python\/quick_start_offline.ipynb",">","`","__",".","======================","======================","Input","Annotation","types","Output","Annotation","type","======================","======================","``","DOCUMENT",",","TOKEN","``","``","WORD_EMBEDDINGS","``","======================","======================","Parameters","--","--","--","--","--","dimension","Number","of","embedding","dimensions","readCacheSize","Cache","size","for","items","retrieved","from","storage",".","Increase","for","performance","but","higher","memory","consumption","Notes","--","--","-","There","are","also","two","convenient","functions","to","retrieve","the","embeddings","coverage","with","respect","to","the","transformed","dataset",":","-",":","meth",":","`",".withCoverageColumn","`",":","Adds","a","custom","column","with","word","coverage","stats","for","the","embedded","field",".","This","creates","a","new","column","with","statistics","for","each","row",".","-",":","meth",":","`",".overallCoverage","`",":","Calculates","overall","word","coverage","for","the","whole","data","in","the","embedded","field",".","This","returns","a","single","coverage","object","considering","all","rows","in","the","field",".","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","=","WordEmbeddingsModel.pretrained","(",")","\\","...",".setInputCols","(","[","``","document","''",",","``","token","''","]",")","\\","...",".setOutputCol","(","``","embeddings","''",")",">",">",">","embeddingsFinisher","=","EmbeddingsFinisher","(",")","\\","...",".setInputCols","(","[","``","embeddings","''","]",")","\\","...",".setOutputCols","(","``","finished_embeddings","''",")","\\","...",".setOutputAsVector","(","True",")","\\","...",".setCleanAnnotations","(","False",")",">",">",">","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","(","5",",","80",")","+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","+","|","result|","+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","+","|","[","-0.570580005645752,0.44183000922203064,0.7010200023651123",",","-0.417129993438720","...","|","|","[","-0.542639970779419,0.4147599935531616,1.0321999788284302",",","-0.4024400115013122","...","|","|","[","-0.2708599865436554,0.04400600120425224",",","-0.020260000601410866",",","-0.17395000159","...","|","|","[","0.6191999912261963,0.14650000631809235",",","-0.08592499792575836",",","-0.2629800140857","...","|","|","[","-0.3397899866104126,0.20940999686717987,0.46347999572753906",",","-0.6479200124740","...","|","+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","+","See","Also","--","--","--","--","SentenceEmbeddings",":","to","combine","embeddings","into","a","sentence-level","representation"]
code: def __init__(
      self,
      classname="com.johnsnowlabs.nlp.embeddings.WordEmbeddingsModel",
      java_model=None,
  ):
      super(WordEmbeddingsModel, self).__init__(
          classname=classname, java_model=java_model
      )
  
file_path: spark-nlp/python/sparknlp/annotator/embeddings/word_embeddings.py
imports: from sparknlp.common import *
label_desc: Use image node_id 2 to create a new WordEmbeddingsModel object from inherited base classes: AnnotatorModel, HasEmbeddingsProperties, HasStorageModel with example: obj = WordEmbeddingsModel(classname, java_model)