# NOT RUN {
library(h2o)
h2o.init()
f <- "https://raw.githubusercontent.com/h2oai/sparkling-water/rel-1.6/examples/smalldata/"
jobtitles <- h2o.importFile(paste0(f, "craigslistJobTitles.csv"),
col.names = c("category", "jobtitle"),
col.types = c("String", "String"), header = TRUE)
words <- h2o.tokenize(jobtitles, " ")
vec <- h2o.word2vec(training_frame = words)
h2o.findSynonyms(vec, "teacher", count = 20)
# }
Run the code above in your browser using DataCamp Workspace