导包
<!-- https://mvnrepository.com/artifact/org.ansj/ansj_seg -->
<dependency>
<groupId>org.ansj</groupId>
<artifactId>ansj_seg</artifactId>
<version>5.1.6</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.nlpcn/nlp-lang -->
<dependency>
<groupId>org.nlpcn</groupId>
<artifactId>nlp-lang</artifactId>
<version>1.7.7</version>
</dependency>
基本使用
ansj分词有四种模式:
基本分词-BaseAnalysis
用户自定义词典 | 数字识别 | 人名识别 | 机构名识别 | 新词发现 |
Χ | √ | Χ | Χ | Χ |