1

I am new to gloVe word embeddings for nlp/deep learning models in R but I find them very useful. I am experiencing problems implementing the model in r. When I use correct constructor:

glove <- GlobalVectors$new(word_vectors_szie = 50, vocabulary = vocab, x_max = 20)

I get the following error:

Error in .subset2(public_bind_env, "initialize")(...) : unused arguments (word_vectors_size = 50, vocabulary = vocab)

Any thoughts on why? Any solutions?

nigus21
  • 337
  • 2
  • 11

1 Answers1

4

The new function specification according to http://text2vec.org/glove.html does not have the vocabulary argument anymore. However, I still also received the same error for the word_vectors_size argument. Removing that from the syntax, an error returned that the value for "rank" was missing. rank = 50 seems to have replaced the word_vectors_size = 50 argument in the function.

This then should work:

glove <- GlobalVectors$new(rank = 50, x_max = 20)
BasD
  • 41
  • 3