public static void addAnn(AnnotationSet outSet, int startOffset, int endOffset,
String type, FeatureMap fm) {
try {
outSet.add((long)startOffset, (long)endOffset, type, fm);
} catch (InvalidOffsetException ex) {
throw new GateRuntimeException("Offset error adding new annotation: ", ex);
}
}