code: public static double similarity(String A, String B)
      {
          long distance = distance(A, B);
          if (distance > dictionary.getMaxSynonymItemIdDistance()) return 0.0;
  
          return (dictionary.getMaxSynonymItemIdDistance() - distance) / (double) dictionary.getMaxSynonymItemIdDistance();
      }
docs: 计算两个单词之间的相似度，0表示不相似，1表示完全相似
  @param A
  @param B
  @return