Skip to content

Instantly share code, notes, and snippets.

@cllu
Last active January 2, 2016 08:59
Show Gist options
  • Save cllu/8279781 to your computer and use it in GitHub Desktop.
Save cllu/8279781 to your computer and use it in GitHub Desktop.

Making use of the Stanford NLP Socket Server

Stanford NER tagger can be started listening to socket easily, which is documented as in the README file.

java -mx1000m -cp $HOME/resources/stanford/tagger/stanford-ner.jar edu.stanford.nlp.ie.NERServer -loadClassifier $HOME/resources/stanford/tagger/classifiers/english.all.3class.distsim.crf.ser.gz -port 1234

The POS tagger also has a built-in MaxentTaggerServer, however, we cannot directly use it.

java -mx1000m -classpath $HOME/resources/stanford/tagger/stanford-postagger.jar edu.stanford.nlp.tagger.maxent.MaxentTaggerServer -model $HOME/resources/stanford/tagger/models/english-bidirectional-distsim.tagger -port 1235
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment