Java CoreNLP中缺少StanfordNLP通用依赖性功能

问题描述 投票:1回答:1

使用最新的CoreNLP 3.9.2 Java API,我希望提取出现在StanfordNLP Python library中以及此处定义的universaldependencies.org/guidelines.html的新通用依赖项功能。具体来说:

  1. 多字令牌
  2. 通用依赖项格式(UPOS)的POS标签
  3. UD格式的语法依赖性(使用UPOS标签)

[当前CoreNLP分别按照herehere所述生成Penn Tree POS标签和依赖项。

管道配置:

    Properties props = new Properties();
    props.setProperty("annotators", "tokenize,ssplit,pos,lemma,ner,parse,depparse,coref,kbp,quote");
    props.setProperty("coref.algorithm", "neural");
    StanfordCoreNLP pipeline = new StanfordCoreNLP(props);
    CoreDocument document = new CoreDocument(text);
    pipeline.annotate(document);

    CoreSentence sentence = document.sentences().get(0);
    sentence.posTags() // get pos tags
    sentence.dependencyParse() // dependency graph

对我的误解的任何帮助和澄清都是必须的。

stanford-nlp
1个回答
0
投票
[法语,德语和西班牙语的代码和模型的GitHub版本接受了CoNLL 2018 UD数据的培训,并支持多词令牌。
© www.soinside.com 2019 - 2024. All rights reserved.