在StanfordNLP Server中自定义NER

问题描述 投票:1回答:1

嗨,我正在尝试将其他实体添加到当前默认规则中。它适用于stanfordNLP中的txt.file,但是当我使用stanfordNLPServer在python中应用时,它无法覆盖默认规则。

我在Python中使用coreNLP的NLTK包装器,输入文本是数据帧中的一列。默认规则运行良好,但无法添加自定义规则。

适用于StanfordCoreNLP的Java命令:

'java -Xmx4g -cp“*”edu.stanford.nlp.pipeline.StanfordCoreNLP -annotators tokenize,ssplit,pos,lemma,ner -ner.additional.regexner.mapping extra.txt -file example.txt -outputFormat text'

但是当我运行以下StanfordCoreNLPServer命令时它失败了:

'java -Xmx4g -cp“*”edu.stanford.nlp.pipeline.StanfordCoreNLPServer -annotators tokenize,ssplit,pos,lemma,ner -ner.additional.regexner.mapping extra.txt -status_port 9000 -port 9000 -timeout 90000& “

我的猜测是coreNLPServer还不能自定义实体,但不确定它。真的很感激,如果有人可以帮助这个!

stanford-nlp
1个回答
© www.soinside.com 2019 - 2024. All rights reserved.