SubTokenAnno sta = new SubTokenAnno(); sta.setBegin(fs.getBegin()); sta.setEnd(fs.getEnd()); sta.setText(fs.getCoveredText()); boolean isMultiToken = isMultiToken(fs); boolean isFirst = true;
if (aSTA.getBegin() == aSTA.getEnd()) { AnnotationUnit newUnit = new AnnotationUnit(aSTA.getBegin(), aSTA.getEnd(), false, ""); for (AnnotationUnit unit : units) { if (unit.begin >= newUnit.begin && unit.end >= newUnit.end) { if (unit.end > aSTA.end) { if (unit.begin == aSTA.begin) { AnnotationUnit newUnit = new AnnotationUnit(aSTA.getBegin(), aSTA.getEnd(), false, aSTA.getText()); updateUnitLists(tmpUnits, unit, newUnit); if (unit.begin <= aSTA.getBegin() && aSTA.getBegin() <= unit.end && aSTA.getEnd() <= unit.end) { AnnotationUnit newUnit = new AnnotationUnit(aSTA.getBegin(), aSTA.getEnd(), false, aSTA.getText()); else if ((unit.begin <= aSTA.getBegin() && aSTA.getBegin() < unit.end && aSTA.getEnd() > unit.end)) { AnnotationUnit newUnit = new AnnotationUnit(aSTA.getBegin(), unit.end, false, aSTA.getText().substring(0, thisSubTextLen)); aSubUnits.add(newUnit); aSTA.setBegin(getNextUnitBegin(aSTA.getBegin())); aSTA.setText(aSTA.getText().trim().substring(thisSubTextLen)); getSubUnits(aSTA, aSubUnits);
private Set<AnnotationUnit> getSubUnits(SubTokenAnno aSTA, Set<AnnotationUnit> aSubUnits) { AnnotationUnit prevUnit = null; List<AnnotationUnit> tmpUnits = new ArrayList<>(units); if(aSTA.getBegin() == aSTA.getEnd()){ AnnotationUnit newUnit = new AnnotationUnit(aSTA.getBegin(), aSTA.getEnd(), false, ""); for(AnnotationUnit unit: units){ if(unit.begin>=newUnit.begin && unit.end>=newUnit.end){ if (unit.end > aSTA.end) { if(unit.begin==aSTA.begin){ AnnotationUnit newUnit = new AnnotationUnit(aSTA.getBegin(), aSTA.getEnd(), false, aSTA.getText()); updateUnitLists(tmpUnits, unit, newUnit); if (unit.begin <= aSTA.getBegin() && aSTA.getBegin() <= unit.end && aSTA.getEnd() <= unit.end) { AnnotationUnit newUnit = new AnnotationUnit(aSTA.getBegin(), aSTA.getEnd(), false, aSTA.getText()); else if ((unit.begin <= aSTA.getBegin() && aSTA.getBegin() < unit.end && aSTA.getEnd() > unit.end)) { AnnotationUnit newUnit = new AnnotationUnit(aSTA.getBegin(), unit.end, false, aSTA.getText().substring(0, thisSubTextLen)); aSubUnits.add(newUnit); aSTA.setBegin(getNextUnitBegin(aSTA.getBegin())); aSTA.setText(aSTA.getText().trim().substring(thisSubTextLen)); getSubUnits(aSTA, aSubUnits); else if(aSTA.getBegin()<=unit.begin && prevUnit !=null && prevUnit.end<unit.begin){ int thisSubTextLen = unit.begin - aSTA.begin;
SubTokenAnno sta = new SubTokenAnno(); sta.setBegin(aFs.getBegin()); sta.setEnd(aFs.getEnd()); sta.setText(aFs.getCoveredText()); boolean isMultiToken = isMultiToken(aFs); boolean isFirst = true;
if (aSTA.getBegin() == aSTA.getEnd()) { AnnotationUnit newUnit = new AnnotationUnit(aSTA.getBegin(), aSTA.getEnd(), false, ""); for (AnnotationUnit unit : units) { if (unit.begin >= newUnit.begin && unit.end >= newUnit.end) { if (unit.end > aSTA.end) { if (unit.begin == aSTA.begin) { AnnotationUnit newUnit = new AnnotationUnit(aSTA.getBegin(), aSTA.getEnd(), false, aSTA.getText()); updateUnitLists(tmpUnits, unit, newUnit); if (unit.begin <= aSTA.getBegin() && aSTA.getBegin() <= unit.end && aSTA.getEnd() <= unit.end) { AnnotationUnit newUnit = new AnnotationUnit(aSTA.getBegin(), aSTA.getEnd(), false, aSTA.getText()); else if ((unit.begin <= aSTA.getBegin() && aSTA.getBegin() < unit.end && aSTA.getEnd() > unit.end)) { AnnotationUnit newUnit = new AnnotationUnit(aSTA.getBegin(), unit.end, false, aSTA.getText().substring(0, thisSubTextLen)); aSubUnits.add(newUnit); aSTA.setBegin(getNextUnitBegin(aSTA.getBegin())); aSTA.setText(aSTA.getText().trim().substring(thisSubTextLen)); getSubUnits(aSTA, aSubUnits);
SubTokenAnno sta = new SubTokenAnno(); sta.setBegin(aFs.getBegin()); sta.setEnd(aFs.getEnd()); sta.setText(aFs.getCoveredText()); boolean isMultiToken = isMultiToken(aFs); boolean isFirst = true;
SubTokenAnno sta = new SubTokenAnno(); sta.setBegin(aFs.getBegin()); sta.setEnd(aFs.getEnd()); sta.setText(aFs.getCoveredText()); boolean isMultiToken = isMultiToken(aFs); boolean isFirst = true;
SubTokenAnno sta = new SubTokenAnno(); sta.setBegin(fs.getBegin()); sta.setEnd(fs.getEnd()); sta.setText(fs.getCoveredText()); boolean isMultiToken = isMultiToken(fs); boolean isFirst = true;
SubTokenAnno sta = new SubTokenAnno(); sta.setBegin(fs.getBegin()); sta.setEnd(fs.getEnd()); sta.setText(fs.getCoveredText()); boolean isMultiToken = isMultiToken(fs); boolean isFirst = true;
SubTokenAnno sta = new SubTokenAnno(); sta.setBegin(fs.getBegin()); sta.setEnd(fs.getEnd()); sta.setText(fs.getCoveredText()); Set<AnnotationUnit> sus = new LinkedHashSet<>(); for (AnnotationUnit newUnit : getSubUnits(sta, sus)) {
SubTokenAnno sta = new SubTokenAnno(); sta.setBegin(fs.getBegin()); sta.setEnd(fs.getEnd()); sta.setText(fs.getCoveredText()); Set<AnnotationUnit> sus = new LinkedHashSet<>(); for (AnnotationUnit newUnit : getSubUnits(sta, sus)) {
SubTokenAnno sta = new SubTokenAnno(); sta.setBegin(fs.getBegin()); sta.setEnd(fs.getEnd()); sta.setText(fs.getCoveredText()); Set<AnnotationUnit> sus = new LinkedHashSet<>(); for (AnnotationUnit newUnit : getSubUnits(sta, sus)) {
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; }
private AnnotationUnit getFirstUnit(AnnotationFS targetFs) { SubTokenAnno sta = new SubTokenAnno(); sta.setBegin(targetFs.getBegin()); sta.setEnd(targetFs.getEnd()); sta.setText(targetFs.getCoveredText()); Set<AnnotationUnit> sus = new LinkedHashSet<>(); AnnotationUnit firstUnit = null; for (AnnotationUnit u : getSubUnits(sta, sus)) { firstUnit = u; break; } return firstUnit; }
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; }
private AnnotationUnit getFirstUnit(AnnotationFS targetFs) { SubTokenAnno sta = new SubTokenAnno(); sta.setBegin(targetFs.getBegin()); sta.setEnd(targetFs.getEnd()); sta.setText(targetFs.getCoveredText()); Set<AnnotationUnit> sus = new LinkedHashSet<>(); AnnotationUnit firstUnit = null; for (AnnotationUnit u : getSubUnits(sta, sus)) { firstUnit = u; break; } return firstUnit; }
private AnnotationUnit getFirstUnit(AnnotationFS targetFs) { SubTokenAnno sta = new SubTokenAnno(); sta.setBegin(targetFs.getBegin()); sta.setEnd(targetFs.getEnd()); sta.setText(targetFs.getCoveredText()); Set<AnnotationUnit> sus = new LinkedHashSet<>(); AnnotationUnit firstUnit = null; for (AnnotationUnit u : getSubUnits(sta, sus)) { firstUnit = u; break; } return firstUnit; }
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; }