class_docstr: Word embedding model.
docstr: Find synonyms using a word2vec model.
  
  :param str word: A single word to find synonyms for.
  :param int count: The first "count" synonyms will be returned.
  
  :returns: the approximate reconstruction of the training data.
  
  :examples:
  
  >>> job_titles = h2o.import_file(("https://s3.amazonaws.com/h2o-public-test-data/smalldata/craigslistJobTitles.csv"), 
  ...                               col_names = ["category", "jobtitle"], 
  ...                               col_types = ["string", "string"], 
  ...                               header = 1)
  >>> words = job_titles.tokenize(" ")
  >>> w2v_model = H2OWord2vecEstimator(epochs = 10)
  >>> w2v_model.train(training_frame=words)
  >>> synonyms = w2v_model.find_synonyms("teacher", count = 5)
  >>> print(synonyms)
docstr_tok: ["Find","synonyms","using","a","word2vec","model",".",":","param","str","word",":","A","single","word","to","find","synonyms","for",".",":","param","int","count",":","The","first","``","count","''","synonyms","will","be","returned",".",":","returns",":","the","approximate","reconstruction","of","the","training","data",".",":","examples",":",">",">",">","job_titles","=","h2o.import_file","(","(","``","https",":","\/\/s3.amazonaws.com\/h2o-public-test-data\/smalldata\/craigslistJobTitles.csv","''",")",",","...","col_names","=","[","``","category","''",",","``","jobtitle","''","]",",","...","col_types","=","[","``","string","''",",","``","string","''","]",",","...","header","=","1",")",">",">",">","words","=","job_titles.tokenize","(","``","``",")",">",">",">","w2v_model","=","H2OWord2vecEstimator","(","epochs","=","10",")",">",">",">","w2v_model.train","(","training_frame=words",")",">",">",">","synonyms","=","w2v_model.find_synonyms","(","``","teacher","''",",","count","=","5",")",">",">",">","print","(","synonyms",")"]
code: def find_synonyms(self, word, count=20):
      """
      Find synonyms using a word2vec model.
  
      :param str word: A single word to find synonyms for.
      :param int count: The first "count" synonyms will be returned.
  
      :returns: the approximate reconstruction of the training data.
  
      :examples:
  
      >>> job_titles = h2o.import_file(("https://s3.amazonaws.com/h2o-public-test-data/smalldata/craigslistJobTitles.csv"),
      ...                               col_names = ["category", "jobtitle"],
      ...                               col_types = ["string", "string"],
      ...                               header = 1)
      >>> words = job_titles.tokenize(" ")
      >>> w2v_model = H2OWord2vecEstimator(epochs = 10)
      >>> w2v_model.train(training_frame=words)
      >>> synonyms = w2v_model.find_synonyms("teacher", count = 5)
      >>> print(synonyms)
      """
      j = h2o.api(
          "GET /3/Word2VecSynonyms",
          data={"model": self.model_id, "word": word, "count": count},
      )
      return OrderedDict(
          sorted(
              zip(j["synonyms"], j["scores"]),
              key=lambda t: t[1],
              reverse=True,
          )
      )
  
file_path: h2o-3/h2o-py/h2o/model/models/word_embedding.py
imports: from h2o.utils.compatibility import *
  from collections import OrderedDict
  import h2o
  from h2o.expr import ExprNode
  from h2o.model import ModelBase
label_desc: Use image node_id 1 for calling the H2OWordEmbeddingModel obj's underlying member method code with example usage: obj.find_synonyms(word, count) and returns: OrderedDict