analogy
public final List<Pair<String, Float>> analogy( String w1, String w2, String w3, Integer N)
Content copied to clipboard
Find the N closest terms in the vocab to the analogy:
The algorithm operates as follow:
Find a vector approximation of the missing word = vec(w2) - vec(w1) + vec(w3).
Return words closest to the approximated vector.
Return
The N closest terms in the vocab to the analogy and their associated cosine similarity scores.