1
我正在尝试使用余弦距离类的apache commons。但它总是返回1.0。我错过了什么?这里是我的代码:apache.commons.text余弦距离
public class ComputeDistance {
public static void main(String[] args)throws Exception{
CosineDistance dist = new CosineDistance();
CharSequence c1 = "example text1";
CharSequence c2 = "another file";
System.out.println(dist.apply(c1,c2));
}
}