Word2VecModel.FindSynonyms(String, Int32) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for