how can i get cosign diatance between two words in Deeplearning4j - Word2vec

315 views Asked by At

I'm using deeplearning4j to learn text data.

I'm done with word2vec tutorial at deeplearning4j website and successfully

trained word vectors with 100 documents.

but i don't know how to get cosign distance of two different words like below picture

enter image description here

Like this picture, if i insert word 'France'

i want to get

[similar words with france + cosign distance]

i can get [similar words with france]

but i don't know how to get cosign distance value.

any solution?

2

There are 2 answers

0
Sungjin.Kim On

oops sorry my bad i missed some parts of tutorial

sorry

i get solution

double cosSim = vec.similarity("day", "night");
        System.out.println(cosSim);
        //output: 0.7704452276229858

sorry

forget about this stupid question

0
Adam Gibson On