GloVe (Global Vectors) is a model for distributed word representation. This is achieved by mapping words into a meaningful space where the distance between words is related to semantic similarity. It outperformed many common Word2vec models on the word analogy task. One benefit of GloVe is that it is the result of directly modeling relationships, instead of getting them as a side effect of training a language model.
How to use
embeddings = WordEmbeddings.pretrained("glove_840B_300", "xx") \ .setInputCols("sentence", "token") \ .setOutputCol("embeddings")
val embeddings = WordEmbeddings.pretrained("glove_840B_300", "xx") .setInputCols("sentence", "token") .setOutputCol("embeddings")
|Compatibility:||Spark NLP 2.4.0+|
|Input Labels:||[sentence, token]|
The model is imported from https://nlp.stanford.edu/projects/glove/