/** Creates a new coreference. It assigns an appropriate ID to it. The Coref is added to the document. * @param references different mentions (list of targets) to the same entity. * @return a new coreference. */ public Coref newCoref(List<Span<Term>> mentions) { String newId = idManager.getNextId(AnnotationType.COREF); Coref newCoref = new Coref(newId, mentions); annotationContainer.add(newCoref, Layer.COREFERENCES, AnnotationType.COREF); return newCoref; }
/** * Creates a new coreference. It assigns an appropriate ID to it. The Coref is added to the document. * * @param references different mentions (list of targets) to the same entity. * @return a new coreference. */ public Coref newCoref(List<Span<Term>> mentions) { String newId = idManager.corefs.getNext(); Coref newCoref = new Coref(newId, mentions); annotationContainer.add(newCoref); return newCoref; }
/** Creates a coreference object to load an existing Coref. It receives it's ID as an argument. The Coref is added to the document. * @param id the ID of the coreference. * @param references different mentions (list of targets) to the same entity. * @return a new coreference. */ public Coref newCoref(String id, List<Span<Term>> mentions) { idManager.updateCounter(AnnotationType.COREF, id); Coref newCoref = new Coref(id, mentions); annotationContainer.add(newCoref, Layer.COREFERENCES, AnnotationType.COREF); return newCoref; }
/** * Creates a coreference object to load an existing Coref. It receives it's ID as an argument. The Coref is added to the document. * * @param id the ID of the coreference. * @param references different mentions (list of targets) to the same entity. * @return a new coreference. */ public Coref newCoref(String id, List<Span<Term>> mentions) { idManager.corefs.update(id); Coref newCoref = new Coref(id, mentions); annotationContainer.add(newCoref); return newCoref; }
Coref corefCopy = new Coref(coref, copiedTerms); kaf.insertCoref(corefCopy);
Coref corefCopy = new Coref(coref, copiedTerms); this.insertCoref(corefCopy);