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
1
vote
1 answer

Encoding problem while training my own Glove model

I am training a GloVe model with my own corpus and I have troubles to save it/load it in an utf-8 format. Here what I tried: from glove import Corpus, Glove #data lines = [['woman', 'umbrella', 'silhouetted'], ['person', 'black',…
AdriBento
  • 589
  • 5
  • 16
1
vote
1 answer

The meaning of hyperparameters in glove

The following is hyperparameters in demo.sh of glove. What is the meaning of VERBOSE, MEMORY, WINDOW_SIZE and BINARY. The WINDOW_SIZE is 15, is that means chose 15 words from right and chose 15 words from left? VERBOSE=2 ? MEMORY=4.0 …
Animeta
  • 1,241
  • 3
  • 16
  • 30
1
vote
1 answer

Create word embeddings without keeping fastText Vector file in the repository

I am trying to embed a sentence with the help of Infersent, and Infersent uses fastText vectors for word embedding. The fastText vector file is close to 5 GiB. When we keep the fastText vector file along with the code repository it makes the…
Tom J Muthirenthi
  • 3,028
  • 7
  • 40
  • 60
1
vote
1 answer

Using GLOVEs pretrained glove.6B.50.txt as a basis for word embeddings R

I'm trying to convert textual data into vectors using GLOVE in r. My plan was to average the word vectors of a sentence, but I can't seem to get to the word vectorization stage. I've downloaded the glove.6b.50.txt file and it's parent zip file from:…
Travasaurus
  • 601
  • 1
  • 8
  • 26
1
vote
2 answers

Is there a way to get the relationship from 'GloVe' word2vec?

I am using Glove, Gensim-word2vec, module and I can use it to return the similarity score between entities such as 'man' and 'woman' will return 0.89034. But is there a way to return the semantic relationship between two entities? For example given…
ananya
  • 879
  • 1
  • 7
  • 14
1
vote
0 answers

How to form sentence embeddings from word embeddings using glove on dataframe trained tensors?

I am working with a dataset containing snippets of event information. My dataframe looks similar to: index| event_description ---------------------- 1 | concert with thousands of people 2 | people gathering 3 | there was an event in the…
callmeGuy
  • 944
  • 2
  • 11
  • 28
0
votes
1 answer

How can my variable paradoxically both an ndarray and also a dict?

I am trying to get my GloVe vectors for a machine learning model, without having to load the model every time. Therefore I would like to save the glove_model dictionary to a json file such that it can be loaded elsewhere after its initial…
upquark00
  • 53
  • 6
0
votes
1 answer

Using glove.6B.100d.txt embedding in spacy getting zero lex.rank

I am trying to load glove 100d emebddings in spacy nlp pipeline. I create the vocabulary in spacy format as follows: python -m spacy init-model en spacy.glove.model --vectors-loc glove.6B.100d.txt glove.6B.100d.txt is converted to word2vec…
nlp-user
  • 3
  • 2
0
votes
0 answers

Error in glove_event$fit_transform in text2vec package

While experimenting with word embedding using text2vec package in R, the following error is thrown embd_dim <- 5 glove_event <- GlobalVectors$new(rank = embd_dim, x_max = 10,learning_rate = 0.01, alpha = 0.95, lambda = 0.005) wrd_embd_event <-…
0
votes
1 answer

how to calculate mean of words' glove embedding in a sentence

I have downloaded the glove trained matrix and used it in a Keras layer. however, I need the sentence embedding for another task. I want to calculate the mean of all the word embeddings that are in that sentence. what is the most efficient way to do…
Mohammad Reza
  • 1,143
  • 4
  • 13
  • 27
0
votes
0 answers

Could not use glove.6B.100d.txt

embedding_dict={} with open('glove.6B.100d.txt') as f: for line in f: values=line.split() word = values[0] vectors=np.asarray(values[1:],'float32') embedding_dict[word]=vectors f.close() ValueError: could not convert string to…
Ekaterina
  • 1
  • 1
0
votes
2 answers

Getting error while using the glove vector

Can anyone please suggest me how to resolve this error. I am simply loading the glove vector and when trying to iterate , it is showing this error embeddings_index = dict() f = open('/content/drive/My Drive/lstm donor/lstm_glove_vectors') for line…
0
votes
0 answers

NLP - Trying to find similarities between different target groups based on input dimensions

So I have a dataset which has one description column (an IT trouble ticket description) and one target column (grouping of the ticket e.g. ticket belongs to Group 0 or Group 1 - the group type e.g. access issues is not provided). The thing is: I…
Swami
  • 25
  • 4
0
votes
3 answers

ValueError: could not convert string to float: '.' during glove embedding

I'm trying to encode word vectors using Glove and I get the error stated above. The data consists of two text columns for the purpose of sentence similarity determination. Can you please help me solve this error? [code] embeddings_index = {} f =…
VishwaV
  • 167
  • 12
0
votes
1 answer

tf.matmul(X,weight) vs tf.matmul(X,tf.traspose(weight)) in tensorflow

In standard ANN for fully connected layers we are using the following formula: tf.matmul(X,weight) + bias. Which is clear to me, as we use matrix multiplication in order to connect input with th hidden layer. But in GloVe…
DY92
  • 437
  • 5
  • 18