构建Stanford CoreNLP时出错

Ian*_*nao 6 java nlp stanford-nlp

当我自己构建Core-NLP时,我收到以下消息:

incompatible types; no instance(s) of type variable(s) VALUE exist so that VALUE conforms to Map<Integer,String>
Run Code Online (Sandbox Code Playgroud)

违规行:

Map<Integer,String> roleMap = ((CoreLabel)t1.label()).get(CoreAnnotations.CoNLLSRLAnnotation.class);
Run Code Online (Sandbox Code Playgroud)

违规功能:

  @SuppressWarnings("unchecked")
  public <VALUE, KEY extends Key<CoreMap, VALUE>>
    VALUE get(Class<KEY> key) {
    for (int i = size; i > 0; ) {
   if (keys[--i] == key) {
    return (VALUE)values[i];
  }
}
    return null;
}
Run Code Online (Sandbox Code Playgroud)

我真的不知道如何解决这个问题.我正在尝试使用Maven构建CoreNLP,以便我可以在项目中轻松使用它.想法?

Ste*_*ert 1

你从哪里获取你的来源?

我从他们的 github 存储库上的 master 分支构建没有任何问题。我使用的是 java 1.8,这是他们的 maven pom 中所必需的。