You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This bug appear when some candidate answer variant don't have head tokens. After the first stream pipeline, Set<Token> heads = TypeUtil.getCandidateAnswerVariants(jcas).stream() .map(TypeUtil::getCandidateAnswerOccurrences).flatMap(Collection::stream) .map(TypeUtil::getHeadTokenOfAnnotation).collect(toSet());
one token is null ( only one because is a Set Collection).
After that, when you call Token::getHead in this part of code: Set<Token> parents = heads.stream().map(Token::getHead).filter(t -> t != null) .filter(t -> !heads.contains(t)).collect(toSet());
A NullPointerException occur.
For solve this, i think you need to put a non null filter.
regard.
The text was updated successfully, but these errors were encountered:
ziy
added a commit
to ziy/bioasq
that referenced
this issue
May 16, 2017
@noyessie Does it make it working or not?
Also, please note that we found excluding this CoveringPhraseCavGenerator from the answer answer generation phrase might give you some improvement over the one that has all.
This bug appear when some candidate answer variant don't have head tokens. After the first stream pipeline,
Set<Token> heads = TypeUtil.getCandidateAnswerVariants(jcas).stream() .map(TypeUtil::getCandidateAnswerOccurrences).flatMap(Collection::stream) .map(TypeUtil::getHeadTokenOfAnnotation).collect(toSet());
one token is null ( only one because is a Set Collection).
After that, when you call
Token::getHead
in this part of code:Set<Token> parents = heads.stream().map(Token::getHead).filter(t -> t != null) .filter(t -> !heads.contains(t)).collect(toSet());
A
NullPointerException
occur.For solve this, i think you need to put a
non null
filter.regard.
The text was updated successfully, but these errors were encountered: