public class HanLPUtil extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
static com.hankcs.hanlp.mining.word2vec.DocVectorModel |
docVectorModel
词向量 ...
|
static List<String> |
skipDictList |
static List<String> |
skipNatureList
词性查看:...
|
| 构造器和说明 |
|---|
HanLPUtil() |
| 限定符和类型 | 方法和说明 |
|---|---|
static double |
getSimilarity(String sentence1,
String sentence2)
相似性比较
|
static List<HotWord> |
hotAnalyse(String content)
热词分析
|
static void |
init(List<String> includeDictList,
List<String> skipDictList,
List<String> skipNatureList,
String word2vecPath) |
static double |
vecSimilarity(String sentence1,
String sentence2)
计算相似度
|
public static com.hankcs.hanlp.mining.word2vec.DocVectorModel docVectorModel
public static double vecSimilarity(String sentence1, String sentence2)
sentence1 - 文本1sentence2 - 文本2public static void init(List<String> includeDictList, List<String> skipDictList, List<String> skipNatureList, String word2vecPath) throws IOException
IOExceptionCopyright © 2024. All rights reserved.