for(Object obj: rhs) {
if(obj instanceof WordInfo) {
res.addWordInfo(((WordInfo) obj));
}
else if(obj instanceof Integer) {
Interval matchingInterval = match.get(((Integer) obj));
res.addSpan(antecedent, matchingInterval.start, matchingInterval.end);
}
else
throw new RuntimeException("Rhs should be a list of wordinfo or integer keys to intervals only");
}
RuleApplication application = new RuleApplication(antecedent, res,new ApplicationInfo(DELETE,
antecedent.lemmaPhrase(match.get(1).start, match.get(1).end)));
application.addFeatures(featurizeDeletedSpan(new Interval(match.get(1).start,match.get(1).end),antecedent));
return Collections.singletonList(application);
}