private CoreMap createMergedChunk(int groupStart, int groupEnd) { CoreMap merged = null; /* if (annotation != null) { // Take start and end merged = ChunkAnnotationUtils.getMergedChunk(elements, annotation.get(CoreAnnotations.TextAnnotation.class), groupStart, groupEnd); } */ if (merged == null) { // Okay, have to go through these one by one and merge them merged = CoreMapAggregator.getDefaultAggregator().merge(elements, groupStart, groupEnd); } return merged; }
public boolean extractAnnotation(Env env, List<? extends CoreMap> source) { return extractAnnotation(source, CoreMapAggregator.getDefaultAggregator()); }
Number v2 = matched.get(matched.size()-1).get(CoreAnnotations.NumericCompositeValueAnnotation.class); if (v2.doubleValue() > v1.doubleValue()) { CoreMap newChunk = CoreMapAggregator.getDefaultAggregator().merge(numerizedTokens, matcher.start(), matcher.end()); newChunk.set(CoreAnnotations.NumericCompositeTypeAnnotation.class, "NUMBER_RANGE"); Pair<Number,Number> range = new Pair<>(v1, v2);
private CoreMap createMergedChunk(int groupStart, int groupEnd) { CoreMap merged = null; /* if (annotation != null) { // Take start and end merged = ChunkAnnotationUtils.getMergedChunk(elements, annotation.get(CoreAnnotations.TextAnnotation.class), groupStart, groupEnd); } */ if (merged == null) { // Okay, have to go through these one by one and merge them merged = CoreMapAggregator.getDefaultAggregator().merge(elements, groupStart, groupEnd); } return merged; }
private CoreMap createMergedChunk(int groupStart, int groupEnd) { CoreMap merged = null; /* if (annotation != null) { // Take start and end merged = ChunkAnnotationUtils.getMergedChunk(elements, annotation.get(CoreAnnotations.TextAnnotation.class), groupStart, groupEnd); } */ if (merged == null) { // Okay, have to go through these one by one and merge them merged = CoreMapAggregator.getDefaultAggregator().merge(elements, groupStart, groupEnd); } return merged; }
public boolean extractAnnotation(Env env, List<? extends CoreMap> source) { return extractAnnotation(source, CoreMapAggregator.getDefaultAggregator()); }
public boolean extractAnnotation(Env env, List<? extends CoreMap> source) { return extractAnnotation(source, CoreMapAggregator.getDefaultAggregator()); }
Number v2 = matched.get(matched.size()-1).get(CoreAnnotations.NumericCompositeValueAnnotation.class); if (v2.doubleValue() > v1.doubleValue()) { CoreMap newChunk = CoreMapAggregator.getDefaultAggregator().merge(numerizedTokens, matcher.start(), matcher.end()); newChunk.set(CoreAnnotations.NumericCompositeTypeAnnotation.class, "NUMBER_RANGE"); Pair<Number,Number> range = new Pair<>(v1, v2);