0

Am using rword2vec package to train the model and using distance function for search word. am using for loop to build models for data set of different category.

Some search words are not available in the trained model and throwing the out of Vocabulary message and terminating the for loop. I just want to skip those error and continue with loop. Can someone guide please ?

library(rword2vec)

word2vec(train_file = "RWord2VecTrain.txt",output_file = "Rword2vec.bin",binary=1)

distance(file_name = "Rword2vec.bin",search_word = "xxx",num = 20)
sophros
  • 11,665
  • 7
  • 38
  • 61
Dhinesh G
  • 23
  • 3
  • Does this answer your question? [How to write trycatch in R](https://stackoverflow.com/questions/12193779/how-to-write-trycatch-in-r) – sophros Aug 19 '21 at 18:06

0 Answers0