Java中文分词hanlp使用
HanLP介绍:http://hanlp.linrunsoft.com/ github地址:https://github.com/hankcs/HanLP 说明:使用hanlp实现分词、智能推荐、关键字提取、摘要等,更多功能参考官网 项目结构 该项目中,.jar和data文件夹和.properties需要从官网/github下载,data文件夹下载 项目配置修改hanlp.properties: /Test/src/hanlp.properties: 本配置文件中的路径的根目录 root=E:/SourceCode/eclipsePlace/Test root=./...... 配置文件的作用是告诉HanLP数据包即data文件夹的位置,root的值为data文件夹的父目录,可以使用绝对路径或相对路径。 测试代码package com.test; import java.util.List; import com.hankcs.hanlp.HanLP;import com.hankcs.hanlp.seg.common.Term;import com.hankcs.hanlp.sugg...

