Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?


Failed to load latest commit information.


An API wrapper based on Stanford NLP packages for the convenience of Chinese users. This package is based on stan-cn-* family:

  • stan-cn-com: Common code base
  • stan-cn-seg: Chinese segmentation and related data model
  • stan-cn-ner: Named entity recognition and related data model
  • stan-cn-tag: POS tagging and related data model

This package bundled seg, ner and tagging together. So if you only need one of them, you can use stan-cn-seg, stan-cn-ner, stan-cn-tag separately.

Purpose of the packages

The original Stanford CoreNLP packages with default language settings in Maven central is only for English. If you are dealing with simplified Chinese, you still need to download the Chinese model and fix some configuration files.

The burden is not too much, but if you deploy these packages to a server cluster, this burden might be amplified.

Whatever you face a single node or a server farm, it would be a pleasurable solution to provide packages with default settings of Chinese language models. That is what we do.

Comments, reviews, bug reports and patches are welcomed.

Current version

Current version is 0.0.4 and based on Stanford CoreNLP 3.2.0 with minor fixes.

including below dependency:

  • maven:
  • leiningen:
    [com.guokr/stan-cn-nlp "0.0.4"]
  • sbt:
    libraryDependencies += "com.guokr" % "stan-cn-nlp" % "0.0.4"

Simplified API

We use a very simple API to reduce the complexity.

    new SegWrapper(settings).segment(text);
    new NerWrapper(settings).recognize(text);
    new TagWrapper(settings).tag(text);

Or if you want to use the default language models, just use


The command line tool

Please follow below steps to play with:

  • git clone git://
  • cd stan-cn-nlp
  • mvn package
  • java -Xms1g -Xmx2g -jar target/stan-cn-nlp-0.0.5-SNAPSHOT-standalone.jar seg "大江东去浪淘尽"
  • java -Xms1g -Xmx2g -jar target/stan-cn-nlp-0.0.5-SNAPSHOT-standalone.jar ner "大江东去浪淘尽"
  • java -Xms1g -Xmx2g -jar target/stan-cn-nlp-0.0.5-SNAPSHOT-standalone.jar tag "大江东去浪淘尽"

Preparation for release

Before release this package to maven central, please execute below commands:

  • mvn clean source:jar javadoc:jar package
  • export MAVEN_OPTS=-Xmx2048m
  • mvn release:clean
  • mvn release:prepare
  • mvn release:perform



GPLv2, just same as the license of Stanford CoreNLP package


stan-cn-nlp: an API wrapper based on Stanford NLP packages for the convenience of Chinese users







No packages published