我在设置stanford-spanish-corenlp-2018-10-05-models.jar中附带的西班牙版本的SUTime时遇到了问题
在斯坦福的文档中,它说选项ner.applyNumericClassifiers = true和ner.useSUTime = true只对英文版有效,但是西班牙的jar附带了一个ner.applyNumericClassifiers = true,我希望它能工作。
我试过用这个代码:
Properties props = new Properties();
props.put("annotators", "tokenize, ssplit, pos, lemma, ner");
props.setProperty("tokenize.language", "es");
...
...
props.setProperties("sutime.rules", "edu/stanford/nlp/models/sutime/spanish.sutime.txt");我真的不知道该如何继续前进,我还没有在其他问题上看到过这个问题,也许有人能帮我。
发布于 2020-04-13 22:00:02
西班牙语将通过默认3.9.2运行SUTime。您只需使用以下属性:
ner.model = edu/stanford/nlp/models/ner/spanish.ancora.distsim.s512.crf.ser.gz
ner.applyNumericClassifiers = true
ner.useSUTime = true
ner.language = es您可以使用以下方法获得默认的西班牙语属性:
Properties props = LanguageInfo.getLanguageProperties("spanish");https://stackoverflow.com/questions/61019742
复制相似问题