StanfordNLP以检测带有介词的复合实体

问题描述 投票:3回答:2

基本上,在句子中:

<Lord of the bracelets> is a fantasy movie.

我想将化合物Lord of the bracelets检测为一个实体(也可以在entitylink注释器中链接)。这意味着使用带有NNPDTNNPNNINDT 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;
  }

谢谢!

[基本上,在句子中:是一部幻想电影。我想将复合手镯作为一个实体进行检测(可以在entitylink中链接...

java stanford-nlp ner
2个回答
1
投票

您可以使用TokensRegex(可能是RegexNER,尽管我不这么认为)。您可以在规则中指定要将某些词性标记模式标记为实体。


0
投票

虽然@StanfordNLPHelp的回答很有帮助,但我想我会在最终解决方案中添加更多详细信息。

© www.soinside.com 2019 - 2024. All rights reserved.