edu.uchsc.ccp.iaa.matcher
Class SpansOverlapSimpleFeatureMatcher
java.lang.Object
edu.uchsc.ccp.iaa.matcher.SpansOverlapSimpleFeatureMatcher
- All Implemented Interfaces:
- Matcher
public class SpansOverlapSimpleFeatureMatcher
- extends Object
- implements Matcher
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SpansOverlapSimpleFeatureMatcher
public SpansOverlapSimpleFeatureMatcher()
match
public Annotation match(Annotation annotation,
String compareSetName,
Set<Annotation> excludeAnnotations,
IAA iaa,
MatchResult matchResult)
- This method will return an annotation that has overlapping spans and the
same simple features. It is not required that the annotation class match.
Preference will be given to an annotation that has the same class and
spans. Secondary preference will be given to an annotation with the same
span followed by an the shortest annotation with overlapping spans and
the same simple features. If no annotation has overlapping spans and the
same simple features, then null is returned.
- Specified by:
match
in interface Matcher
- Parameters:
matchResult
- will be set to:
- TRIVIAL_NONMATCH if there are no overlapping annotations
with the passed in annotation
- NONTRIVIAL_MATCH if there is an annotation that is
overlapping and the Annotation.compareSimpleFeatures returns
NONTRIVIAL_MATCH
- TRIVIAL_MATCH if there is an annotation that is
overlapping and the Annotation.compareSimpleFeatures returns
TRIVIAL_MATCH
Note: if there is a trivial_match then there cannot possibly
be a NONTRIVIAL_MATCH because one of the simple features of
the passed in annotation must have a null value or there are
no simple features.
- NONTRIVIAL_NONMATCH if there an annotation that is
overlapping and the Annotation.compareSimpleFeatures returns
NONTRIVIAL_NONMATCH
- TRIVIAL_NONMATCH if there is no match or non-trivial
non-match found.
annotation
- the annotation that is to be matchedcompareSetName
- the set of annotations that we will look for a match inexcludeAnnotations
- a set of annotations that cannot be the return valueiaa
- an instance of IAA from which to get information about
annotations
- Returns:
- will return the first nontrivial match that it finds preferring
- See Also:
Matcher.match(Annotation, String, Set,
IAA, MatchResult)
,
MatchResult.NONTRIVIAL_MATCH
,
MatchResult.NONTRIVIAL_NONMATCH
,
MatchResult.TRIVIAL_MATCH
,
MatchResult.TRIVIAL_NONMATCH
getName
public String getName()
- Specified by:
getName
in interface Matcher
getDescription
public String getDescription()
- Specified by:
getDescription
in interface Matcher
returnsTrivials
public boolean returnsTrivials()
- Specified by:
returnsTrivials
in interface Matcher