use of de.tudarmstadt.ukp.clarin.webanno.tsv.util.AnnotationUnit in project webanno by webanno.
the class WebannoTsv3Writer method getFirstUnit.
// for relation annotation drawn on multiple span annotation, we put the info only to the first
// unit
private AnnotationUnit getFirstUnit(AnnotationUnit aUnit) {
SubTokenAnno sta = new SubTokenAnno();
sta.setBegin(aUnit.begin);
sta.setEnd(aUnit.end);
sta.setText(aUnit.token);
Set<AnnotationUnit> sus = new LinkedHashSet<>();
AnnotationUnit firstUnit = null;
for (AnnotationUnit u : getSubUnits(sta, sus)) {
firstUnit = u;
break;
}
return firstUnit;
}
Aggregations