问题描述
我想知道如何使用在Python CoreNLP中的Java CoreNLP中训练的自定义NER模型?
解决方法
您应该使用Stanza的CoreNLP客户端:https://stanfordnlp.github.io/stanza/corenlp_client.html
启动服务器时,以属性"ner.model": "/path/to/custom_model.ser.gz"
如果您只想运行NER模型,则可能还需要设置属性"ner.statisticalOnly": True
。 ner
注释器默认将运行大量其他进程。