2

I run following command to start NER server

java -mx1000m -cp stanford-ner.jar edu.stanford.nlp.ie.NERServer -loadClassifier ner-model.ser.gz -port 8081 -outputFormat inlineXML

In here, I have used classifier(ner-model.ser.gz) manually created by me. I want to use default classifier english.muc.7class.distsim.crf.ser.gz (It is given by them) along with the one created by me

I tried following command

java -mx1000m -cp stanford-ner.jar edu.stanford.nlp.ie.NERServer -loadClassifier classifiers/english.muc.7class.distsim.crf.ser.gz ner-model.ser.gz -port 8081 -outputFormat inlineXML

But it did not work. Please Help since I am new to this.

Vy Do
  • 46,709
  • 59
  • 215
  • 313
Vinit Gaikwad
  • 329
  • 9
  • 21

2 Answers2

1

Unfortunately, at present the NERServer code only supports loading one classifier, so there is no solution here without writing code. It would not be a big change to allow NERServer to load multiple classifiers, as Stanford CoreNLP does. Someone who knows Java could do it, or we might do it in some future release, but no particular schedule for that.

Christopher Manning
  • 9,360
  • 34
  • 46
  • How do you add, in Stanford CoreNLP, a custom NER classifier alongside the 7 class default classifier? I've been trying do so in command line, but I've only managed get it to use just one of them with `java -cp stanford-corenlp-3.5.2.jar:stanford-corenlp-3.5.2-models.jar:stanford-ner.jar edu.stanford.nlp.ie.crf.CRFClassifier -loadClassifier english.muc.7class.distsim.crf.ser.gz pg_threechapters_merged_ner-model.ser.gz -textFile pg_threechapters_sutime.txt -outputFormat tsv 2 > testusingtwoclassifiers2.txt` – GreatDane Jun 07 '15 at 21:37
  • I saw [your answer](http://stackoverflow.com/questions/27257554/stanford-ner-can-i-use-two-classifiers-at-once-in-my-code/27368251#27368251) with the `NERClassifierCombiner`. Is it possible to do so in command line? – GreatDane Jun 07 '15 at 21:41
-1

Can you try adding , in between two archive files

java -mx1000m -cp stanford-ner.jar edu.stanford.nlp.ie.NERServer -loadClassifier classifiers/english.muc.7class.distsim.crf.ser.gz,ner-model.ser.gz -port 8081 -outputFormat inlineXML
Joseph Selvaraj
  • 2,225
  • 1
  • 21
  • 21