edu.stanford.nlp.linalg
Class Cosine
java.lang.Object
|
+--edu.stanford.nlp.linalg.Cosine
- All Implemented Interfaces:
- Similarity
- public class Cosine
- extends Object
- implements Similarity
Cosine similarity function
Method Summary |
double |
similarity(Array i,
Array j)
calculates the cosine of the angle between Array i and Array j |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Cosine
public Cosine()
similarity
public double similarity(Array i,
Array j)
- calculates the cosine of the angle between Array i and Array j
- Specified by:
similarity
in interface Similarity
Stanford NLP Group