When I build Core-NLP on my own, I get the following message:
incompatible types; no instance(s) of type variable(s) VALUE exist so that VALUE conforms to Map<Integer,String>
The offending line:
Map<Integer,String> roleMap = ((CoreLabel)t1.label()).get(CoreAnnotations.CoNLLSRLAnnotation.class);
The offending function:
@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;
}
I really have no clue how to fix this. I'm trying to build CoreNLP with Maven so I can use it easily in my project. Ideas?
Where are you grabbing your source from?
I had no problem building from the master branch on their github repository. I'm using java 1.8, which is required in their maven pom.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With