for (AnalyzedToken tmpReading : readings) {
if (skipSol && tmpReading.getPOSTag() != null && tmpReading.getPOSTag().endsWith(":SOL")) {
// SOL = alleinstehend - needs to be skipped so we find errors like "An der roter Ampel."
continue;
}
final AnalyzedGermanToken reading = new AnalyzedGermanToken(tmpReading);
if (reading.getCasus() == null && reading.getNumerus() == null &&
reading.getGenus() == null) {
continue;
}
if (reading.getGenus() == GermanToken.Genus.ALLGEMEIN &&
reading.getPOSTag() != null && !reading.getPOSTag().endsWith(":STV")) { // STV: stellvertretend (!= begleitend)
// genus=ALG in the original data. Not sure if this is allowed, but expand this so
// e.g. "Ich Arbeiter" doesn't get flagged as incorrect:
set.add(makeString(reading.getCasus(), reading.getNumerus(), GermanToken.Genus.MASKULINUM, omit));
set.add(makeString(reading.getCasus(), reading.getNumerus(), GermanToken.Genus.FEMININUM, omit));
set.add(makeString(reading.getCasus(), reading.getNumerus(), GermanToken.Genus.NEUTRUM, omit));
} else {
set.add(makeString(reading.getCasus(), reading.getNumerus(), reading.getGenus(), omit));
}
}
return set;
}