Questions tagged [glove]

GloVe is an unsupervised learning algorithm for obtaining vector representations for words (word embeddings).

GloVe is an unsupervised learning algorithm for obtaining vector representations for words (word embeddings). See https://nlp.stanford.edu/projects/glove/ for more information.

92 questions
2
votes
1 answer

Error when downloading the glove_python package

When I try to download the glove_python package by pip install glove_python I get the following error: Using cached glove_python-0.1.0.tar.gz (263 kB) Requirement already satisfied: numpy in…
user20896
  • 51
  • 1
  • 1
  • 3
2
votes
0 answers

how to download co-occurance matrix for glove pre-trained word vectors

I am trying to train glove embeddings on a domain corpus, trying to experiment with incremental training with existing glove vectors, but unable to get the co-occurrence matrix for glove pre-trained word vectors. how do I get the co-occurrence…
Hari Prasad
  • 1,162
  • 1
  • 10
  • 11
2
votes
0 answers

what's the differences of the from_pretrained and weight.data.copy in Pytorch.Embedding

recently , I use glove to initialize the weight of Embedding, I find out the differences of from_pretrained and weight.data.copy_ is that : from_pretrained = {weight.data.copy_() ; embedding.weight.requires_grad = False} I want to know if what I…
Xu Changan
  • 21
  • 1
2
votes
1 answer

Getting word embeddings using XLNet?

Hello I have been trying to contextual extract word embedding using the novel XLNet but without luck. Running on Google Colab with TPU I would like to note that I get this error when I use TPU so thus I switch to GPU to avoid the error xlnet_config…
IS92
  • 690
  • 1
  • 13
  • 28
2
votes
1 answer

GloVe Word Vectors Cosine Similarity - "Ally" closer to "powerful" than 'friend"

When I tested the two words "ally" and "friend" for cosine similarity (using a function verified to be a correct implementation) in python 3.6 with GloVe word vectors, the cosine similarity was 0.6274969008615137. When I tested "ally" and "friend"…
DarthCadeus
  • 372
  • 3
  • 13
2
votes
0 answers

What is the difference between word2vec, glove, and elmo?

What is the difference between word2vec, glove, and elmo? According to my understanding all of them are used for training word embedding, am I correct?
hR 312
  • 824
  • 1
  • 9
  • 22
2
votes
2 answers

Is there a way to remove a word from a KeyedVectors vocab?

I need to remove an invalid word from the vocab of a "gensim.models.keyedvectors.Word2VecKeyedVectors". I tried to remove it using del model.vocab[word], if I print the model.vocab the word disappeared, but when I run model.most_similar using other…
2
votes
1 answer

ValueError: need more than 0 values to unpack - Glove

I downloaded the Glove model https://nlp.stanford.edu/projects/glove/ and I train the Glove model use my own corpus, I didn't change anything else other than adding my own corpus. but it gives the following errors. 01/30/19 - 11:15.01AM, iter:…
Sashini Hettiarachchi
  • 1,630
  • 2
  • 10
  • 21
2
votes
4 answers

Error while embedding: could not convert string to float: 'ng'

I am working on Pre trained word vectors using GloVe method. Data contains vectors on Wikipedia data. While embedding data i am getting error stating that could not convert string to float: 'ng' I tried going through data but there i was not able to…
2
votes
1 answer

How to calculate similarity for pre-trained word embeddings

I want to know the most similar words to another from a pretrained embedding vectors in R. E.g: words similar to "beer". For this, I download the pretrained embedding vectors on http://nlp.stanford.edu/data/glove.twitter.27B.zip and applied the code…
2
votes
1 answer

Adding additional words in word2vec or Glove (maybe using gensim)

I have two pretrained word embeddings: Glove.840b.300.txt and custom_glove.300.txt One is pretrained by Stanford and the other is trained by me. Both have different sets of vocabulary. To reduce oov, I'd like to add words that don't appear in file1…
aerin
  • 20,607
  • 28
  • 102
  • 140
1
vote
0 answers

How to use GloVe word embedding for non-English text

I am trying to run a GloVe word embedding on a Bengali news dataset. Now the original GloVe source doesn't have any supported language other than English but I found this which has word vectors pretrained for 30 non-English languages. I am running…
afsara_ben
  • 542
  • 1
  • 11
  • 30
1
vote
0 answers

GloVe - Subscript out of bounds error in R

I am attempting to write a feature that checks for each query what the maximum score is. The query is the search term, and the glove word vectors are trained using product descriptions. The code I use for training the word vectors and the feature…
Laurie
  • 13
  • 5
1
vote
1 answer

Category detection

i have used this code for category detection.. import numpy as np # Words -> category categories = {word: key for key, words in data.items() for word in words} # Load the whole embedding matrix embeddings_index = {} with open('glove.6B.100d.txt',…
1
vote
1 answer

Validation accuracy increases then suddenly decreases

I am training an LSTM model on the SemEval 2017 task 4A dataset. I observe that first validation accuracy increases along with training accuracy but then suddenly decreases by a significant amount. The loss decreases but validation loss increases by…
PeakyBlinder
  • 1,059
  • 1
  • 14
  • 35