Class PatternResolutionChain
- java.lang.Object
-
- de.julielab.genemapper.composites.CompositePatternResolver
-
- de.julielab.genemapper.composites.PatternResolutionChain
-
public class PatternResolutionChain extends CompositePatternResolver
-
-
Constructor Summary
Constructors Constructor Description PatternResolutionChain(CompositePatternResolver... resolvers)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringisEligible(String geneName)Checks the gene name for eligibility with regards to the original gene name string.Stringmatches(String tagging)Requires the completed composite tagging viaFlairCompositeMentionTaggerand returnstrueif the respective subclass handles the given case.List<ResolvedCompositeGeneName>resolve(String originalMention, org.apache.commons.lang3.tuple.Pair<List<CompositeToken>,String> tokenizedMentionAndTagging)-
Methods inherited from class de.julielab.genemapper.composites.CompositePatternResolver
getName
-
-
-
-
Constructor Detail
-
PatternResolutionChain
public PatternResolutionChain(CompositePatternResolver... resolvers)
-
-
Method Detail
-
isEligible
public String isEligible(String geneName)
Description copied from class:CompositePatternResolverChecks 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.- Specified by:
isEligiblein classCompositePatternResolver- Parameters:
geneName- The original gene name string.- Returns:
trueif this mention should tagged for composite tokens orfalseotherwise.
-
matches
public String matches(String tagging)
Description copied from class:CompositePatternResolverRequires the completed composite tagging via
FlairCompositeMentionTaggerand returnstrueif the respective subclass handles the given case.- Specified by:
matchesin classCompositePatternResolver- Parameters:
tagging- The gene name composite tagging result.- Returns:
- Whether or not the given tagging is handled.
-
resolve
public List<ResolvedCompositeGeneName> resolve(String originalMention, org.apache.commons.lang3.tuple.Pair<List<CompositeToken>,String> tokenizedMentionAndTagging)
- Specified by:
resolvein classCompositePatternResolver
-
-