一、pom.xml
<!-- 分词库 -->
<dependency>
<groupId>org.apdplat</groupId>
<artifactId>word</artifactId>
<version>1.2</version>
</dependency>
二、使用api编程
package cn.hhb.spark.mllib
import org.apdplat.word.WordSegmenter
object WordToKenizer {
def main(args: Array[String]) {
var list = WordSegmenter.seg("南京市长江大桥")
println(list)
}
}