ChunkedArgumentExtraction arg2 = extr.getArgument2();
ChunkedSentence sentence = arg2.getSentence();
List<Match<ChunkedSentenceToken>> matchList = listPattern2
.findAll(ChunkedSentenceToken.tokenize(sentence));
for (Match<ChunkedSentenceToken> match : matchList) {
Range matchRange = new Range(match.startIndex(),
match.endIndex() - match.startIndex());
if (matchRange.overlapsWith(arg2.getRange())) {
return true;
}
}
matchList = listPattern1.findAll(ChunkedSentenceToken
.tokenize(sentence));
for (Match<ChunkedSentenceToken> match : matchList) {
Range matchRange = new Range(match.startIndex(),
match.endIndex() - match.startIndex());
if (matchRange.overlapsWith(arg2.getRange())) {
return true;
}
}
return false;
}