How do I include more than one classifiers when us

2019-02-11 06:04发布

问题:

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.

回答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.



回答2:

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