📜  获取字符串匹配百分比java代码示例

📅  最后修改于: 2022-03-11 14:52:28.115000             🧑  作者: Mango

代码示例1

    org.apache.commons
    commons-lang3
    ${commons.lang.version}


@Test
public void test_stringDistance() throws Exception {
    String teamName = "Partizn Belgrade";
    String propositionName = "Partizan Belgrade";

    // This one seems better
    double distance = StringUtils.getJaroWinklerDistance(teamName, propositionName);
    System.out.println(distance);
}