Class GeneMention
- java.lang.Object
-
- de.julielab.jules.ae.genemapping.genemodel.GeneMention
-
- All Implemented Interfaces:
de.julielab.java.utilities.spanutils.Span
public class GeneMention extends java.lang.Object implements de.julielab.java.utilities.spanutils.SpanA basic "gene mention" that most of all contains the text of the mention. However, we might also need other information, i.e. offsets.- Author:
- faessler
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classGeneMention.GeneTaggerstatic classGeneMention.SpecificType
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringNOIDConstant meaning that no ID is given for a GeneMention.
-
Constructor Summary
Constructors Constructor Description GeneMention()GeneMention(GeneMention gm)Makes a copy of the given GeneMention but NOT from its MentionMappingResult.GeneMention(java.lang.String text)GeneMention(java.lang.String text, int begin, int end)GeneMention(java.lang.String text, TermNormalizer normalizer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidacceptHighestScoringTaxForBestMappingCandidate()Sets the currently highest-scoring taxonomy ID to the current bestcandidate of the mentionMappingResult, which also causes the bestcandidate to set the corresponding gene/protein ID as its ID.voidaddTaggingModifier(java.lang.String modifier)booleanequals(java.lang.Object obj)intgetBegin()org.apache.lucene.search.QuerygetContextQuery()java.lang.StringgetDocId()java.lang.StringgetDocumentContext()intgetEnd()cc.mallet.types.FeatureVectorgetFeatureVector()GeneDocumentgetGeneDocument()GeneNamegetGeneName()java.lang.StringgetGoldTaxonomyId()java.lang.StringgetId()The gene ID of this gene mention.MentionMappingResultgetMentionMappingResult()java.lang.StringgetNormalizedText()java.util.List<java.lang.String>getNormalizedTextVariant()TermNormalizergetNormalizer()org.apache.commons.lang3.Range<java.lang.Integer>getOffsets()java.lang.ObjectgetOriginalMappedObject()The original UIMA annotation that is mapped.GeneMentiongetParent()A parent GeneMention is a GeneMention that has been split into sub-mentions, most commonly due to conjunctions or enumerations within a GeneMention.java.util.List<PosTag>getPosTags()java.lang.StringgetReducedNameForExactMatch()GeneMention.SpecificTypegetSpecificType()doublegetSpecificTypeConfidence()GeneMention.GeneTaggergetTagger()java.util.List<java.lang.String>getTaggingModifiers()com.google.common.collect.Multimap<java.lang.String,GeneSpeciesOccurrence>getTaxonomyCandidates()java.lang.StringgetTaxonomyId()java.util.Set<java.lang.String>getTaxonomyIds()GeneSpeciesOccurrencegetTaxonomyReliability()doublegetTaxonomyScore(java.lang.String taxonomyId)java.util.Map<java.lang.String,java.lang.Double>getTaxonomyScores()java.lang.StringgetText()inthashCode()voidsetContextQuery(org.apache.lucene.search.Query contextQuery)voidsetDocId(java.lang.String docId)voidsetDocumentContext(java.lang.String documentContext)voidsetFeatureVector(cc.mallet.types.FeatureVector featureVector)voidsetGeneDocument(GeneDocument geneDocument)voidsetGoldTaxonomyId(java.lang.String goldTaxonomyId)voidsetId(java.lang.String id)voidsetMentionMappingResult(MentionMappingResult mentionMappingResult)voidsetNormalizer(TermNormalizer normalizer)voidsetOffsets(org.apache.commons.lang3.Range<java.lang.Integer> offsets)voidsetOriginalMappedObject(java.lang.Object originalMappedObject)voidsetParent(GeneMention parent)voidsetPosTags(java.util.List<PosTag> posTags)voidsetReducedNameForExactMatch(java.lang.String reducedNameForExactMatch)voidsetSpecificType(GeneMention.SpecificType specificType)voidsetSpecificTypeConfidence(double specificTypeConfidence)voidsetTagger(GeneMention.GeneTagger tagger)voidsetTaxonomyCandidates(com.google.common.collect.Multimap<java.lang.String,GeneSpeciesOccurrence> taxonomyCandidates)voidsetTaxonomyId(java.lang.String taxonomyId)voidsetTaxonomyReliability(GeneSpeciesOccurrence taxonomyReliability)voidsetTaxonomyScore(java.lang.String tax, double score)voidsetTaxonomyScores(java.util.Map<java.lang.String,java.lang.Double> taxonomyScores)voidsetText(java.lang.String text)java.lang.StringtoString()
-
-
-
Field Detail
-
NOID
public static final java.lang.String NOID
Constant meaning that no ID is given for a GeneMention.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
GeneMention
public GeneMention()
-
GeneMention
public GeneMention(GeneMention gm)
Makes a copy of the given GeneMention but NOT from its MentionMappingResult.- Parameters:
gm- The gene mention to copy.
-
GeneMention
public GeneMention(java.lang.String text)
-
GeneMention
public GeneMention(java.lang.String text, TermNormalizer normalizer)
-
GeneMention
public GeneMention(java.lang.String text, int begin, int end)
-
-
Method Detail
-
getOriginalMappedObject
public java.lang.Object getOriginalMappedObject()
The original UIMA annotation that is mapped. Most likely a subclass of EntityMention.
- Returns:
- The original object to be mapped.
-
setOriginalMappedObject
public void setOriginalMappedObject(java.lang.Object originalMappedObject)
-
getGoldTaxonomyId
public java.lang.String getGoldTaxonomyId()
-
setGoldTaxonomyId
public void setGoldTaxonomyId(java.lang.String goldTaxonomyId)
-
setTaxonomyScore
public void setTaxonomyScore(java.lang.String tax, double score)
-
getTaxonomyScore
public double getTaxonomyScore(java.lang.String taxonomyId)
-
getTaxonomyScores
public java.util.Map<java.lang.String,java.lang.Double> getTaxonomyScores()
-
setTaxonomyScores
public void setTaxonomyScores(java.util.Map<java.lang.String,java.lang.Double> taxonomyScores)
-
getTaxonomyReliability
public GeneSpeciesOccurrence getTaxonomyReliability()
-
setTaxonomyReliability
public void setTaxonomyReliability(GeneSpeciesOccurrence taxonomyReliability)
-
getTaggingModifiers
public java.util.List<java.lang.String> getTaggingModifiers()
-
acceptHighestScoringTaxForBestMappingCandidate
public void acceptHighestScoringTaxForBestMappingCandidate()
Sets the currently highest-scoring taxonomy ID to the current bestcandidate of the mentionMappingResult, which also causes the bestcandidate to set the corresponding gene/protein ID as its ID.NOTE: If no gene name could be found by the taxonomy score assignment component that matched any of the taxonomy candidates, the taxonomy scores will be null. Consequently, no taxonomy ID will be set to the mention mapping result.
-
getTaxonomyId
public java.lang.String getTaxonomyId()
-
setTaxonomyId
public void setTaxonomyId(java.lang.String taxonomyId)
-
getTaxonomyIds
public java.util.Set<java.lang.String> getTaxonomyIds()
-
getTaxonomyCandidates
public com.google.common.collect.Multimap<java.lang.String,GeneSpeciesOccurrence> getTaxonomyCandidates()
-
setTaxonomyCandidates
public void setTaxonomyCandidates(com.google.common.collect.Multimap<java.lang.String,GeneSpeciesOccurrence> taxonomyCandidates)
-
getDocumentContext
public java.lang.String getDocumentContext()
-
setDocumentContext
public void setDocumentContext(java.lang.String documentContext)
-
getContextQuery
public org.apache.lucene.search.Query getContextQuery()
-
setContextQuery
public void setContextQuery(org.apache.lucene.search.Query contextQuery)
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
getBegin
public int getBegin()
- Specified by:
getBeginin interfacede.julielab.java.utilities.spanutils.Span
-
getDocId
public java.lang.String getDocId()
-
setDocId
public void setDocId(java.lang.String docId)
-
getEnd
public int getEnd()
- Specified by:
getEndin interfacede.julielab.java.utilities.spanutils.Span
-
getGeneName
public GeneName getGeneName()
-
getId
public java.lang.String getId()
The gene ID of this gene mention. This is mostly used for evaluation and might not be set in a variety of situations. During the mapping process the final mapped ID of this mention is determined by the mention mapping result, seegetMentionMappingResult().- Returns:
- The gene ID of this mention, if set.
-
setId
public void setId(java.lang.String id)
-
getNormalizer
public TermNormalizer getNormalizer()
-
setNormalizer
public void setNormalizer(TermNormalizer normalizer)
-
getOffsets
public org.apache.commons.lang3.Range<java.lang.Integer> getOffsets()
- Specified by:
getOffsetsin interfacede.julielab.java.utilities.spanutils.Span
-
setOffsets
public void setOffsets(org.apache.commons.lang3.Range<java.lang.Integer> offsets)
-
getText
public java.lang.String getText()
-
setText
public void setText(java.lang.String text)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getNormalizedText
public java.lang.String getNormalizedText()
-
getNormalizedTextVariant
public java.util.List<java.lang.String> getNormalizedTextVariant()
-
getTagger
public GeneMention.GeneTagger getTagger()
-
setTagger
public void setTagger(GeneMention.GeneTagger tagger)
-
getMentionMappingResult
public MentionMappingResult getMentionMappingResult()
- Returns:
- The object representing the result of the mapping process for this particular gene mention.
-
setMentionMappingResult
public void setMentionMappingResult(MentionMappingResult mentionMappingResult)
-
getGeneDocument
public GeneDocument getGeneDocument()
-
setGeneDocument
public void setGeneDocument(GeneDocument geneDocument)
-
getParent
public GeneMention getParent()
A parent GeneMention is a GeneMention that has been split into sub-mentions, most commonly due to conjunctions or enumerations within a GeneMention. Thus, when parent is not null, this GeneMention resulted from a split of another GeneMention.- Returns:
- The GeneMention that has been split to produce this - and possibly other - GeneMention(s).
-
setParent
public void setParent(GeneMention parent)
-
addTaggingModifier
public void addTaggingModifier(java.lang.String modifier)
-
getPosTags
public java.util.List<PosTag> getPosTags()
-
setPosTags
public void setPosTags(java.util.List<PosTag> posTags)
-
getSpecificType
public GeneMention.SpecificType getSpecificType()
-
setSpecificType
public void setSpecificType(GeneMention.SpecificType specificType)
-
getFeatureVector
public cc.mallet.types.FeatureVector getFeatureVector()
-
setFeatureVector
public void setFeatureVector(cc.mallet.types.FeatureVector featureVector)
-
getSpecificTypeConfidence
public double getSpecificTypeConfidence()
-
setSpecificTypeConfidence
public void setSpecificTypeConfidence(double specificTypeConfidence)
-
getReducedNameForExactMatch
public java.lang.String getReducedNameForExactMatch()
-
setReducedNameForExactMatch
public void setReducedNameForExactMatch(java.lang.String reducedNameForExactMatch)
-
-