package com.ruoyi.biemo.nlp;

import com.hankcs.hanlp.dictionary.CoreSynonymDictionary;

//相似度计算
public class WordDistanceUtils {

    //语义距离
    public Long distance(String a,String b){
       return CoreSynonymDictionary.distance(a, b);
    }

    //语义相似度
    public Double similarity(String a,String b){
       return CoreSynonymDictionary.similarity(a, b);
    }
}
