使用Stanford Corenlp对中文进行词性标注
语言为Scala,使用的jar的版本是3.6.0,而且是手动添加jar包,使用sbt添加其他版本的时候出现了各种各样的问题
添加的jar包有5个

代码
import edu.stanford.nlp.pipeline.{Annotation, StanfordCoreNLP}
/**
  * Created by common on 17-5-13.
  */
object NLPLearning {
  def main(args: Array[String]): Unit = {
    val props="StanfordCoreNLP-chinese.properties"
    val pipeline = new StanfordCoreNLP(props)
    val annotation = new Annotation("这家酒店很好,我很喜欢。")
    pipeline.annotate(annotation)
    pipeline.prettyPrint(annotation, System.out)
  }
}
词性标记
动词,形容词(4):VA,VC,VE,VV
名词(3):NR,NT,NN
定位(1):LC
代词(1):PN
限定词和数词(3):DT,CD,OD
度量词(1):M
副词(1):AD
介词(1):P
连词(2):CC,CS
助词(8):DEC,DEG,DER,DEV,SP,AS,ETC,SP,MSP
其他(8):IJ,ON,PU,JJ,FW,LB,SB,BA


原文:http://www.cnblogs.com/tonglin0325/p/6850901.html