edu.uchsc.ccp.knowtator.util
Class ConsensusSet
java.lang.Object
edu.uchsc.ccp.knowtator.util.ConsensusSet
public class ConsensusSet
- extends Object
- Author:
- Philip V. Ogren
This class does not represent a consensus set of annotations. It
serves a class that helps manage a set of consensus annotations. When
the menu item 'Create Consensus Set' is run an instance of 'knowtator
set' will be created. Annotations in this set define a consensus set.
When redundant annotations exist in the set we want to consolidate
them. This is done by identifying that there is an annotation from
each of the individual annotators that is exactly the same. We can
then change the annotator to one of the annotations to the team
annotator and discard the others. This class facilitates the
consolidation of such redundant annotations - typically one text
source at a time.
ConsensusSet
public ConsensusSet(Set<SimpleInstance> annotations,
SimpleInstance consensusSet,
KnowtatorManager manager)
throws ConsensusException
- Throws:
ConsensusException
consolidateAnnotations
public void consolidateAnnotations(SimpleInstance consensusAnnotation,
SimpleInstance redundantAnnotation)
- This method consolidates two anntotations into one. It does this by
removing one annotation from the consensus set (the redundantAnnotation)
and making the other as annotated by the 'Team Annotator'. One of the
important things that is done before the redundant annotation is deleted
is to have the complex slot mentions whose value is the redundant
annotation change their value to the consensusAnnotation. This is done
with a call to replaceSlotValue.
- Parameters:
consensusAnnotation
- the annotation that will stick aroundredundantAnnotation
- the annotation that is going away- See Also:
replaceSlotValue(SimpleInstance, SimpleInstance)
consolidateAnnotations
public void consolidateAnnotations()
finalize
protected void finalize()
- Overrides:
finalize
in class Object
destroy
public void destroy()
getTeamAnnotator
public SimpleInstance getTeamAnnotator()