Open carljameson2 opened 7 years ago
I use Stanford CoreNLP 3.6.0 and Java 1.8. Make sure these are what you include in your project.
if (this.props.containsKey(STOPWORDS_LIST)) {
String stopwordList = props.getProperty(STOPWORDS_LIST);
boolean ignoreCase = Boolean.parseBoolean(props.getProperty(IGNORE_STOPWORD_CASE, "false"));
this.stopwords = getStopWordList(stopwordList, ignoreCase);
} else {
this.stopwords = (Set
@Override
public Set
for (Integer key: selectedNP.keySet()){
Phrase nounPhrase = selectedNouns.get(key);
List
List<String> verbs = new ArrayList<>();
Collections.sort(phrases, (a, b) -> a.getId().compareTo(b.getId())); //this line shows error
those 3 snippets are different parts of the code. First two are part of stopwordannotator.java and third is from parser.java
Can you post the error log here?
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0 at edu.stanford.nlp.parser.lexparser.EnglishTreebankParserParams.main(EnglishTreebankParserParams.java:2372)
Line no 441 in Parser.java shows me an error only which says 'a' cannot be resolved.
sorry, It was both a and b cannot be resolved into variables.
The error with line 441 in Parser.java is mostly because you are setting the language level of your project lower than 1.8. What IDE are you using? Try to change the language level to see if this issue is resolved. Lambda expression is only available in Java 1.8, I believe.
I'm working on Eclipse.
Error doesn't go even when I use 1.8
I am trying to make some improvements in your project but the StopwordAnnotator.java has some errors. I tried to incorporate all the jar files related to apache lucene analyzer but the issue in the words 'Requirement' , ''English_stop_words_set' , 'Stanford_stopword' show errors. Also what jar file is required for 'edu.stanford.nlp.hcoref.data.CorefChain' Can you help me with that?