PrintWriter writer = new PrintWriter(new java.io.File(odir + "/" + file.getName()));
XmiCasDeserializer.deserialize(inputStream, cas);
JCas jcas = cas.getJCas();
String sofaString = jcas.getDocumentText();
System.err.println("Converting text string: " + sofaString);
CharacterOffsetToLineTokenConverterDefaultImpl converter = new CharacterOffsetToLineTokenConverterDefaultImpl(sofaString);
AnnotationIndex<Annotation> aIndex = jcas.getAnnotationIndex(assertionType);
for (Annotation a : aIndex) {
Assertion ai = (Assertion) a;
int begin = ai.getBegin();
int end = ai.getEnd();
LineAndTokenPosition begPos = converter.convert(begin);
LineAndTokenPosition endPos = converter.convert(end);
writer.println("c=\"" + sofaString.substring(begin,end) + "\" " + begPos.getLine() + ":" + begPos.getTokenOffset() +
" " + endPos.getLine() + ":" + endPos.getTokenOffset() + "||t=\"problem\"||a=\"" + ai.getAssertionType() + "\"");
}
writer.close();
} catch (Exception e) {