How do I include more than one classifiers when using Stanford named entity recogniser?
Asked Answered
J

2

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.

Jokester answered 1/4, 2013 at 15:49 Comment(0)
F
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.

Finnigan answered 23/7, 2013 at 16:58 Comment(2)
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.txtPustulant
I saw your answer with the NERClassifierCombiner. Is it possible to do so in command line?Pustulant
A
-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
Alien answered 1/4, 2013 at 17:13 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.