/** Creates a new category. It assigns an appropriate ID to it. The category is added to the document. * @param lemma the lemma of the category. * @param references different mentions (list of targets) to the same category. * @return a new coreference. */ public Feature newCategory(String lemma, List<Span<Term>> references) { String newId = idManager.getNextId(AnnotationType.CATEGORY); Feature newCategory = new Feature(newId, lemma, references); annotationContainer.add(newCategory, Layer.CATEGORIES, AnnotationType.CATEGORY); return newCategory; }
/** Creates a new property. It receives it's ID as an argument. The property is added to the document. * @param id the ID of the property. * @param lemma the lemma of the property. * @param references different mentions (list of targets) to the same property. * @return a new coreference. */ public Feature newProperty(String id, String lemma, List<Span<Term>> references) { idManager.updateCounter(AnnotationType.PROPERTY, id); Feature newProperty = new Feature(id, lemma, references); annotationContainer.add(newProperty, Layer.PROPERTIES, AnnotationType.PROPERTY); return newProperty; }
/** Creates a new category. It receives it's ID as an argument. The category is added to the document. * @param id the ID of the category. * @param lemma the lemma of the category. * @param references different mentions (list of targets) to the same category. * @return a new coreference. */ public Feature newCategory(String id, String lemma, List<Span<Term>> references) { idManager.updateCounter(AnnotationType.CATEGORY, id); Feature newCategory = new Feature(id, lemma, references); annotationContainer.add(newCategory, Layer.CATEGORIES, AnnotationType.CATEGORY); return newCategory; }
/** Creates a new property. It assigns an appropriate ID to it. The property is added to the document. * @param lemma the lemma of the property. * @param references different mentions (list of targets) to the same property. * @return a new coreference. */ public Feature newProperty(String lemma, List<Span<Term>> references) { String newId = idManager.getNextId(AnnotationType.PROPERTY); Feature newProperty = new Feature(newId, lemma, references); annotationContainer.add(newProperty, Layer.PROPERTIES, AnnotationType.PROPERTY); return newProperty; }
/** * Creates a new category. It receives it's ID as an argument. The category is added to the document. * * @param id the ID of the category. * @param lemma the lemma of the category. * @param references different mentions (list of targets) to the same category. * @return a new coreference. */ public Feature newCategory(String id, String lemma, List<Span<Term>> references) { idManager.categories.update(id); Feature newCategory = new Feature(id, lemma, references); annotationContainer.add(newCategory); return newCategory; }
/** * Creates a new category. It assigns an appropriate ID to it. The category is added to the document. * * @param lemma the lemma of the category. * @param references different mentions (list of targets) to the same category. * @return a new coreference. */ public Feature newCategory(String lemma, List<Span<Term>> references) { String newId = idManager.categories.getNext(); Feature newCategory = new Feature(newId, lemma, references); annotationContainer.add(newCategory); return newCategory; }
/** * Creates a new property. It assigns an appropriate ID to it. The property is added to the document. * * @param lemma the lemma of the property. * @param references different mentions (list of targets) to the same property. * @return a new coreference. */ public Feature newProperty(String lemma, List<Span<Term>> references) { String newId = idManager.properties.getNext(); Feature newProperty = new Feature(newId, lemma, references); annotationContainer.add(newProperty); return newProperty; }
/** * Creates a new property. It receives it's ID as an argument. The property is added to the document. * * @param id the ID of the property. * @param lemma the lemma of the property. * @param references different mentions (list of targets) to the same property. * @return a new coreference. */ public Feature newProperty(String id, String lemma, List<Span<Term>> references) { idManager.properties.update(id); Feature newProperty = new Feature(id, lemma, references); annotationContainer.add(newProperty); return newProperty; }