* @param input modified SE sentence used for regular expression match
* @return true if finds a given pattern, else false
*/
private boolean hasPatternOfDrugDueToPse(JCas jcas, PotentialSideEffect pse, String input) {
//false if not satisfied a given pattern
PatternMatch pm = new PatternMatch("(<@DRUG>).*(KW).*(<@PSE>)", input, causeWord2);
if(!pm.mat.find()) return false;
//false if there is PSE between @DRUG and KW
if(pm.isPseBetween(pm.mat.end(1), pm.mat.start(2))) return false;
//false if there is DRUG between KW and @PSE
if(pm.isDrugBetween(pm.mat.end(2), pm.mat.start(3))) return false;
//if exist another DRUG(s) between @DRUG and KW (i.e., @DRUG...DRUG...KW)
//only "and" "or" "," is permitted between @DRUG and DRUG
if(pm.isDrugBetween(pm.mat.end(1), pm.mat.start(2))) {
if(pm.isDistantBetween(pm.mat.end(1), pm.mat.start(2)))
return false;
}
return true;
}