/** * Adds a coreference to the container */ void add(Coref coref) { coreferences.add(coref); /* Index by terms */ for (Span<Term> span : coref.getSpans()) { for (Term term : span.getTargets()) { indexAnnotation(coref, term.getId(), corefsIndexedByTerm); } } //this.indexBySent(coref, coref.getSpans().get(0).getTargets().get(0).getSent(), this.corefsIndexedBySent); }
/** * Adds a factuality to the container */ void add(Factuality factuality) { factualities.add(factuality); /* Index by terms */ if (factuality.getWFs() != null) { for (WF wf : factuality.getWFs()) { indexAnnotation(factuality, wf.getId(), factsIndexedByWF); } } }
/** * Adds a feature to the container. It checks if it is a property or a category. */ void add(Feature feature) { if (feature.isAProperty()) { properties.add(feature); /* Index by terms */ for (Term term : feature.getTerms()) { indexAnnotation(feature, term.getId(), propertiesIndexedByTerm); } //this.indexBySent(feature, feature.getSpans().get(0).getTargets().get(0).getSent(), this.propertiesIndexedBySent); } else { categories.add(feature); /* Index by terms */ for (Term term : feature.getTerms()) { indexAnnotation(feature, term.getId(), categoriesIndexedByTerm); } //this.indexBySent(feature, feature.getSpans().get(0).getTargets().get(0).getSent(), this.categoriesIndexedBySent); } }
/** * Adds a named entity to the container */ void add(Entity entity) { entities.add(entity); /* Index by terms */ for (Term term : entity.getTerms()) { indexAnnotation(entity, term.getId(), entitiesIndexedByTerm); } this.indexBySent(entity, entity.getSpans().get(0).getTargets().get(0).getSent(), this.entitiesIndexedBySent); }
/** Adds a timeExpression to the container */ void add(Timex3 timex3) { timeExpressions.add(timex3); /* Index by terms */ if(timex3.hasSpan()){ for (WF wf : timex3.getSpan().getTargets()) { indexAnnotation(timex3, wf.getId(), timeExsIndexedByWF); } } }
/** * Adds a linked entity to the container */ void add(LinkedEntity linkedEntity) { linkedEntities.add(linkedEntity); /* Index by terms */ if (linkedEntity.getWFs() != null) { for (WF wf : linkedEntity.getWFs().getTargets()) { indexAnnotation(linkedEntity, wf.getId(), linkedEntitiesIndexedByWF); } } }
/** * Adds a SST to the container */ void add(SSTspan sst) { sstSpans.add(sst); /* Index by terms */ if (sst.getTerms() != null) { for (Term t : sst.getTerms().getTargets()) { indexAnnotation(sst, t.getId(), sstSpansIndexedByTerm); } } }
/** * Adds a relation to the container */ void add(Relation relation) { relations.add(relation); /* Index by 'from' and 'to' terms */ if (relation.getFrom() != null) { String rId = relation.getFrom().getId(); indexAnnotation(relation, rId, relationsIndexedByRelational); } if (relation.getTo() != null) { String rId = relation.getTo().getId(); indexAnnotation(relation, rId, relationsIndexedByRelational); } }
/** * Adds a chunk to the container */ void add(Chunk chunk) { chunks.add(chunk); /* Index by terms */ for (Term term : chunk.getTerms()) { indexAnnotation(chunk, term.getId(), chunksIndexedByTerm); } this.indexBySent(chunk, chunk.getSpan().getTargets().get(0).getSent(), this.chunksIndexedBySent); }
/** * Adds a predicate to the container */ void add(Predicate predicate) { predicates.add(predicate); /* Index by terms */ for (Term term : predicate.getTerms()) { indexAnnotation(predicate, term.getId(), predicatesIndexedByTerm); } this.indexBySent(predicate, predicate.getSpan().getTargets().get(0).getSent(), this.predicatesIndexedBySent); }
void add(Term term, int index) { terms.add(index, term); for (WF wf : term.getWFs()) { indexAnnotation(term, wf.getId(), termsIndexedByWF); } if (!term.isComponent()) { this.indexBySent(term, term.getSent(), this.termsIndexedBySent); } }
void add(Annotation ann, Layer layer, AnnotationType type, Integer position) { Helper.addAnnotation(ann, layer, getGroupID(ann), position, this.layers); Helper.addAnnotation(ann, type, getGroupID(ann), position, this.annotations); /* Index */ this.indexAnnotation(ann, type); }
/** * Adds a dependency to the container */ void add(Dep dep) { deps.add(dep); /* Index by 'from' and 'to' terms */ if (dep.getFrom() != null) { String tId = dep.getFrom().getId(); indexAnnotation(dep, tId, depsIndexedByTerm); } if (dep.getTo() != null) { String tId = dep.getTo().getId(); indexAnnotation(dep, tId, depsIndexedByTerm); } this.indexBySent(dep, dep.getFrom().getSent(), this.depsIndexedBySent); }