public static List<CoreMap> getAnnotatedChunksUsingSortedCharOffsets( CoreMap annotation, List<IntPair> charOffsets) { return getAnnotatedChunksUsingSortedCharOffsets(annotation, charOffsets, true, null, null, true); }
/** Returns a chunk annotation based on char offsets. * * @param annotation Annotation from which to extract the text for this chunk * @param charOffsetStart Start character offset * @param charOffsetEnd End (not inclusive) character offset * @return An Annotation representing the new chunk. Or {@code null} if no chunk matches offsets. */ public static CoreMap getAnnotatedChunkUsingCharOffsets(CoreMap annotation, int charOffsetStart, int charOffsetEnd) { // TODO: make more efficient search List<CoreMap> cm = getAnnotatedChunksUsingSortedCharOffsets(annotation, CollectionUtils.makeList(new IntPair(charOffsetStart, charOffsetEnd))); if ( ! cm.isEmpty()) { return cm.get(0); } else { return null; } }
public static List<CoreMap> getAnnotatedChunksUsingSortedCharOffsets( CoreMap annotation, List<IntPair> charOffsets) { return getAnnotatedChunksUsingSortedCharOffsets(annotation, charOffsets, true, null, null, true); }
public static List<CoreMap> getAnnotatedChunksUsingSortedCharOffsets( CoreMap annotation, List<IntPair> charOffsets) { return getAnnotatedChunksUsingSortedCharOffsets(annotation, charOffsets, true, null, null, false); }
public static List<CoreMap> getAnnotatedChunksUsingSortedCharOffsets( CoreMap annotation, List<IntPair> charOffsets) { return getAnnotatedChunksUsingSortedCharOffsets(annotation, charOffsets, true, null, null, true); }
public static List<CoreMap> getAnnotatedChunksUsingSortedCharOffsets( CoreMap annotation, List<IntPair> charOffsets) { return getAnnotatedChunksUsingSortedCharOffsets(annotation, charOffsets, true, null, null, true); }
public static CoreMap getAnnotatedChunkUsingCharOffsets(CoreMap annotation, int charOffsetStart, int charOffsetEnd) { // TODO: make more efficient search List<CoreMap> cm = getAnnotatedChunksUsingSortedCharOffsets(annotation, CollectionUtils.makeList(new IntPair(charOffsetStart, charOffsetEnd))); if (cm != null && cm.size() > 0) { return cm.get(0); } else { return null; } }
public static CoreMap getAnnotatedChunkUsingCharOffsets(CoreMap annotation, int charOffsetStart, int charOffsetEnd) { // TODO: make more efficient search List<CoreMap> cm = getAnnotatedChunksUsingSortedCharOffsets(annotation, CollectionUtils.makeList(new IntPair(charOffsetStart, charOffsetEnd))); if (cm != null && cm.size() > 0) { return cm.get(0); } else { return null; } }
/** Returns a chunk annotation based on char offsets. * * @param annotation Annotation from which to extract the text for this chunk * @param charOffsetStart Start character offset * @param charOffsetEnd End (not inclusive) character offset * @return An Annotation representing the new chunk. Or {@code null} if no chunk matches offsets. */ public static CoreMap getAnnotatedChunkUsingCharOffsets(CoreMap annotation, int charOffsetStart, int charOffsetEnd) { // TODO: make more efficient search List<CoreMap> cm = getAnnotatedChunksUsingSortedCharOffsets(annotation, CollectionUtils.makeList(new IntPair(charOffsetStart, charOffsetEnd))); if ( ! cm.isEmpty()) { return cm.get(0); } else { return null; } }
/** Returns a chunk annotation based on char offsets. * * @param annotation Annotation from which to extract the text for this chunk * @param charOffsetStart Start character offset * @param charOffsetEnd End (not inclusive) character offset * @return An Annotation representing the new chunk. Or {@code null} if no chunk matches offsets. */ public static CoreMap getAnnotatedChunkUsingCharOffsets(CoreMap annotation, int charOffsetStart, int charOffsetEnd) { // TODO: make more efficient search List<CoreMap> cm = getAnnotatedChunksUsingSortedCharOffsets(annotation, CollectionUtils.makeList(new IntPair(charOffsetStart, charOffsetEnd))); if ( ! cm.isEmpty()) { return cm.get(0); } else { return null; } }