@Override public void onRender(TypeAdapter aAdapter, VDocument aResponse, Map<AnnotationFS, VSpan> annoToSpanIdx) { if (aAdapter.getLayer().isCrossSentence()) { return; } // Since we split spans into multiple ranges at sentence boundaries, we can simply check // if there are multiple ranges for a given span. This is cheaper than checking for // every annotation whether the begin/end offset is in the same sentence. for (Entry<AnnotationFS, VSpan> e : annoToSpanIdx.entrySet()) { if (e.getValue().getRanges().size() > 1) { aResponse.add(new VComment(new VID(e.getKey()), ERROR, "Crossing sentence bounardies is not permitted.")); } } }
@Override public void onRender(TypeAdapter aAdapter, VDocument aResponse, Map<AnnotationFS, VSpan> annoToSpanIdx) { if (aAdapter.getLayer().isCrossSentence()) { return; } // Since we split spans into multiple ranges at sentence boundaries, we can simply check // if there are multiple ranges for a given span. This is cheaper than checking for // every annotation whether the begin/end offset is in the same sentence. for (Entry<AnnotationFS, VSpan> e : annoToSpanIdx.entrySet()) { if (e.getValue().getRanges().size() > 1) { aResponse.add(new VComment(new VID(e.getKey()), ERROR, "Crossing sentence bounardies is not permitted.")); } } }
anno.setRanges(toRanges(vspan.getRanges())); annotations.add(anno);
anno.setRanges(toRanges(vspan.getRanges())); annotations.add(anno);
List<Offsets> offsets = toOffsets(vspan.getRanges()); String bratLabelText = TypeUtil.getUiLabelText(typeAdapter, vspan.getFeatures()); String bratHoverText = TypeUtil.getUiHoverText(typeAdapter,
List<Offsets> offsets = toOffsets(vspan.getRanges()); String bratLabelText = TypeUtil.getUiLabelText(typeAdapter, vspan.getFeatures()); String bratHoverText = TypeUtil.getUiHoverText(typeAdapter,