Share via


Word2VecModel.FindSynonyms(String, Int32) Method

Definition

Find num number of words whose vector representation most similar to the supplied vector. If the supplied vector is the vector representation of a word in the model's vocabulary, that word will be in the results. Returns a dataframe with the words and the cosine similarities between the synonyms and the given word vector.

public Microsoft.Spark.Sql.DataFrame FindSynonyms (string word, int num);
member this.FindSynonyms : string * int -> Microsoft.Spark.Sql.DataFrame
Public Function FindSynonyms (word As String, num As Integer) As DataFrame

Parameters

word
String

The "word" to find similarities for, this can be a string or a vector representation.

num
Int32

The number of words to find that are similar to "word"

Returns

Applies to