dselivanov / text2vec

Fast vectorization, topic modeling, distances and GloVe word embeddings in R.
http://text2vec.org
Other
849 stars 135 forks source link

How to initialize a new word2vec model with pre-trained model weights? #301

Closed athammad closed 5 years ago

athammad commented 5 years ago

Hi Dimitry,

first of all thank you for your great work! text2vecis a wonderful package!!!

In gensimI can initialise my model weights with some pre-trained word2vec model. This well described in the following question on datascience.stackexchange . I was wandering if this functionality is available in text2vecand if you could help me to translate reproduce se same example in R.

Cheers

dselivanov commented 5 years ago

take a look to the https://cran.r-project.org/web/packages/rsparse/ . GloVe implementation migrated from here to this package. There is init param - https://github.com/dselivanov/rsparse/blob/327f45e67e08309e80fe712d3cd3bfa252287a1a/R/model_GloVe.R#L46-L50. See the source code for more details.

athammad commented 5 years ago

Thank you Dimitriy,

is there any example/ application? Sincerely I don't understand what to do form the documentation.

dselivanov commented 5 years ago

unfortunately no - see the source code.