基本上,在句子中:
<Lord of the bracelets> is a fantasy movie.
我想将化合物Lord of the bracelets
检测为一个实体(也可以在entitylink注释器中链接)。这意味着使用带有NNP
DT
NNP
或NN
IN
DT
NNP
形式的POS标签检测结构。
CoreNLP可以吗?
我当前的设置无法检测到它们,因此我找不到解决方法。
public NamedEntityRecognition() { Properties props = new Properties(); props.setProperty("annotators", "tokenize,ssplit,pos,lemma,ner,entitylink"); props.setProperty("tokenize.options", "untokenizable=noneDelete"); pipeline = new StanfordCoreNLP(props); } public CoreDocument recogniseEntities(String text) { CoreDocument doc = new CoreDocument(text); pipeline.annotate(doc); return doc; }
谢谢!
[基本上,在句子中:
您可以使用TokensRegex(可能是RegexNER,尽管我不这么认为)。您可以在规则中指定要将某些词性标记模式标记为实体。
虽然@StanfordNLPHelp的回答很有帮助,但我想我会在最终解决方案中添加更多详细信息。