Stanford nlp 如何设置stanford CRF分类器来侦听http请求?

Stanford nlp 如何设置stanford CRF分类器来侦听http请求?,stanford-nlp,ner,Stanford Nlp,Ner,我有一个自定义CRF分类器,我使用它来侦听套接字请求: java -mx2g -cp stanford-ner-2018-10-16\stanford-ner.jar edu.stanford.nlp.ie.NERServer -loadClassifier model\custom-ner.gz -port 9191 -outputFormat inlineXML 如何改为侦听http请求 这就是我迄今为止所尝试的: java -mx4g -cp "stanford-corenlp-full

我有一个自定义CRF分类器,我使用它来侦听套接字请求:

java -mx2g -cp stanford-ner-2018-10-16\stanford-ner.jar edu.stanford.nlp.ie.NERServer -loadClassifier model\custom-ner.gz -port 9191 -outputFormat inlineXML
如何改为侦听http请求

这就是我迄今为止所尝试的:

java -mx4g -cp "stanford-corenlp-full-2018-10-05\*" edu.stanford.nlp.pipeline.StanfordCoreNLPServer -port 9191 -outputFormat inlineXML  -serverProperties server.properties
其中server.properties包含:

annotators=ner
ner.model=model/custom-ner.gz
outputFormat=xml
但我有两个主要问题:

我找不到以inlineXML格式输出的选项。 与套接字方式相比,这是如此缓慢,它似乎加载了许多我不确定是否需要的库
问题是,当您运行完整的管道时,它正在运行完整的ner工具套件,包括用于细粒度ner的基于词典的系统。如果不想使用-ner.applyFinegured,则应将其设置为false

关于ner系统的完整说明如下:

此时服务器没有inlineXML选项,因为它返回的是一整套注释,所以这种输出类型没有意义。我想我们可以创建AnnotationOutputter的一个子类来处理这种情况