Class CompositePatternResolver
- java.lang.Object
-
- de.julielab.genemapper.composites.CompositePatternResolver
-
- Direct Known Subclasses:
EmbeddedAcronymPatternResolver,EnumerationResolver,NumberElipseEnumerationPatternResolver,PatternResolutionChain,SlashDashAlternativePatternResolver,TwoPartedRangePatternResolver
public abstract class CompositePatternResolver extends Object
This is the base class for composite gene name resolution classes.
For each composite type there is a subclass handling the respective cases.
-
-
Constructor Summary
Constructors Constructor Description CompositePatternResolver()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description StringgetName()abstract StringisEligible(String geneName)Checks the gene name for eligibility with regards to the original gene name string.abstract Stringmatches(String tagging)Requires the completed composite tagging viaFlairCompositeMentionTaggerand returnstrueif the respective subclass handles the given case.abstract List<ResolvedCompositeGeneName>resolve(String originalMention, org.apache.commons.lang3.tuple.Pair<List<CompositeToken>,String> tokenizedMentionAndTagging)
-
-
-
Method Detail
-
getName
public String getName()
-
isEligible
public abstract String isEligible(String geneName)
Checks the gene name for eligibility with regards to the original gene name string.
This step should return
truein doubt butfalsewhen it is clear that the given mention cannot be a composite handled by the respective subclass. This is done to reduce unnecessary composite tagging time.- Parameters:
geneName- The original gene name string.- Returns:
trueif this mention should tagged for composite tokens orfalseotherwise.
-
matches
public abstract String matches(String tagging)
Requires the completed composite tagging via
FlairCompositeMentionTaggerand returnstrueif the respective subclass handles the given case.- Parameters:
tagging- The gene name composite tagging result.- Returns:
- Whether or not the given tagging is handled.
-
resolve
public abstract List<ResolvedCompositeGeneName> resolve(String originalMention, org.apache.commons.lang3.tuple.Pair<List<CompositeToken>,String> tokenizedMentionAndTagging)
-
-