int first = Integer.parseInt(sides[0]);
int second = Integer.parseInt(sides[1]);
//they're both integers, see if they're both between 1000-3000 (likely years)
if (1000 <= first && first <= 3000 && 1000 <= second && second <= 3000) {
wi.set(CoreAnnotations.NamedEntityTagAnnotation.class, "DATE");
String dateStr = new ISODateInstance(new ISODateInstance(sides[0]), new ISODateInstance(sides[1])).getDateString();
if (DEBUG) {
System.err.println("#5: Changing normalized NER from " +
wi.get(CoreAnnotations.NormalizedNamedEntityTagAnnotation.class) + " to " + dateStr + " at index " + i);
}
wi.set(CoreAnnotations.NormalizedNamedEntityTagAnnotation.class, dateStr);