我在设置SUTime的西班牙语版本时遇到麻烦。stanford-spanish-corenlp-2018-10-05-models.jar
[在斯坦福大学的文件中说,选项ner.applyNumericClassifiers = true
和ner.useSUTime = true
仅对英语版本有效,但是西班牙罐子附带了spanish.sutime.txt,我希望它能正常工作。
我尝试使用此代码:
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");
我真的不知道该如何前进,在其他任何问题上我也都没有看到这个问题,也许有人可以帮助我。
Spanish默认将运行3.9.2。您可以只使用以下属性:
ner.model = edu/stanford/nlp/models/ner/spanish.ancora.distsim.s512.crf.ser.gz
ner.applyNumericClassifiers = true
ner.useSUTime = true
ner.language = es