}else if(!filterPattern.applies(surfaceFormOccurrence)){
decisions.add("Dropped by Pattern filter: " + surfaceFormOccurrence);
}else{
SpotClassification spotClassification;
try {
spotClassification = unigramClassifier.classify(surfaceFormOccurrence);
if(spotClassification.getCandidateClass() == SpotClass.valid) {
selectedOccurrences.add(surfaceFormOccurrence);
//LOG.info(("Kept by UnigramClassifier (Confidence: " + spotClassification.getConfidence() + "): " + surfaceFormOccurrence);
}else{
decisions.add("Dropped by UnigramClassifier (Confidence: " + spotClassification.getConfidence() + "): " + surfaceFormOccurrence);
}
} catch (Exception e) {
LOG.error("Exception when classifying unigram candidate: " + e);
}
}
}else{
/**
* n > 1
*/
SpotClassification spotClassification;
try{
spotClassification = ngramClassifier.classify(surfaceFormOccurrence);
}catch (Exception e) {
LOG.error("Exception when classifying ngram candidate: " + e);
continue;
}
if(spotClassification.getCandidateClass() == SpotClass.valid) {
selectedOccurrences.add(surfaceFormOccurrence);
//LOG.info("Kept by nGramClassifier (Confidence: " + spotClassification.getConfidence() + "): " + surfaceFormOccurrence);
}else{
decisions.add("Dropped by NGramClassifier: " + surfaceFormOccurrence);
}