|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectgov.nih.nlm.nls.nlp.textfeatures.MmObject
gov.nih.nlm.nls.nlp.textfeatures.Candidate
public final class Candidate
Candidate Wed Oct 11 10:33:18 EDT 2000, mork Initial Version
| Field Summary |
|---|
| Fields inherited from class gov.nih.nlm.nls.nlp.textfeatures.MmObject |
|---|
serialVersionUID |
| Constructor Summary | |
|---|---|
Candidate(Candidate aCandidate,
int refCandidatePos,
int sizeOfPhrase,
boolean DEBUG)
This is a constructor for Candidate |
|
Candidate(java.lang.String NMSTR,
java.lang.String STR,
int distance,
int phrasePos,
boolean DEBUG)
This is a constructor for Candidate |
|
Candidate(java.lang.String SUI,
java.lang.String NMSTR,
java.lang.String STR,
int distance,
int phrasePos,
boolean DEBUG)
This is a constructor for Candidate |
|
Candidate(java.lang.String SUI,
java.lang.String NMSTR,
java.lang.String STR,
java.lang.String CONCEPT,
int distance,
int phrasePos,
boolean DEBUG)
This is a constructor for Candidate |
|
| Method Summary | |
|---|---|
void |
addMatchedToken(Token pToken,
java.util.List pPartialCandidateTokens)
addMatchedToken adds a token of a Phrase that participated within a match from this candidate to the Phrase This token is the original element from the Phrase. |
void |
addMatchedVariant(Variant pVariant,
java.util.List pPartialCandidateWordTokens)
addMatchedVariant adds to a list of the matched variants that directly participated in this match, and the matching candidate word. |
void |
addMatchMap(MatchMap aMatchMap)
addMatchMap adds a derived phrase to the set of derived phrases. |
void |
addToCandidate(Candidate aCandidate,
int refCandidatePos,
int sizeOfPhrase)
Method addToCandidate is a FinalCandidate method that concatinates Candidates when forming a FinalCandidate. |
void |
computeCohesiveness(int sizeOfPhrase,
gov.nih.nlm.nls.utils.GlobalBehavior settings)
Method computeCohesiveness The cohesiveness value is similar to the coverage value but emphasizes the importance of connected components. |
void |
computeCoverage(int sizeOfPhrase)
Method computeCoverage The coverage value indicates how much of the phrase string and the Metathesaurus string are involved in the match. |
void |
computeFinalCohesiveness(Phrase aPhrase,
int sizeOfPhrase,
gov.nih.nlm.nls.utils.GlobalBehavior settings)
Method computeFinalCohesiveness The cohesiveness value is similar to the coverage value but emphasizes the importance of connected components. |
void |
computeFinalScore(gov.nih.nlm.nls.utils.GlobalBehavior settings,
boolean strFlag)
Method computeFinalScore Now that we have computed all of the component values - we combine them all into the final score with the proper weighting. |
void |
computeFinalScore(gov.nih.nlm.nls.utils.GlobalBehavior settings,
boolean pIsExactMatch,
boolean strFlag)
Method computeFinalScore Now that we have computed all of the component values - we combine them all into the final score with the proper weighting. |
void |
computeInvolvement(int sizeOfPhrase)
Method computeInvolvement The coverage value indicates how much of the phrase string and the Metathesaurus string are involved in the match. |
void |
computeVariation()
Method computeVariation The variation value estimates how much the variants in the Metathesaurus string differ from the corresponding words in the phrase. |
boolean |
containsHead()
Method containsHead returns whether this candidate's span includes the head of the query phrase. |
void |
doCandidatePosCheck(boolean flag)
Method doCandidatePosCheck |
void |
doFinalScoring(gov.nih.nlm.nls.utils.GlobalBehavior settings,
Phrase aPhrase,
int sizeOfPhrase)
Method doFinalScoring. |
boolean |
fillsOpening(Candidate aCandidate,
int sizeOfPhrase,
int candPos)
Method fillsOpening This routine determines if the test candidate fits into the matchmap for this phrase. |
java.util.ArrayList |
findMatchingCandidateTokens(java.util.List pPartialCandidateWordTokens)
findMatchingCandidateTokens retrieves a matching token from the tokenized Candidate. |
boolean |
getAddedNew()
Method getAddedNew |
UMLSSourceInfo[] |
getAllSources()
Method getAllSources retrieves all the sources for this cui of the candidate |
java.lang.String |
getAllSourcesList()
Method getAllSourcesList retrieves all (unique) sources for this cui candidate in a comma separated list of source abbreviations |
int |
getCandidateScore()
Method getCandidateScore Return the score computed matching the UMLS_String to the Phrase This will have the same result as the method getFinalScore(). |
int |
getCentrality()
Method getCentrality |
double |
getCohesiveness()
Method getCohesiveness Return the Cohesiveness value for this candidate. |
java.lang.String |
getConcept()
Method getConcept retrieves the concept name which is the preferred string of the preferred term of all the terms from the concept. |
double |
getCoverage()
Method getCoverage Return the coverage value for this candidate. |
java.lang.String |
getCUI()
Method getCUI |
int |
getCuiHash()
Method getCuiHash retrieves the cui as an int. |
int |
getDistValue()
Method getDistValue |
java.lang.String |
getFinal_strString()
Method getFinal_strString is a FinalCandidate method that retrieves the combined Strings of the Candidates that make up this FinalCandidate |
int |
getFinalScore()
Method getFinalScore Return the score computed matching the UMLS_String to the Phrase |
double |
getInvolvement()
Method getInvolvement Return the involvement value for this candidate. |
java.lang.String |
getLOW()
Method getLOW get List of words that make up the lowercased UMLS String. |
java.util.ArrayList |
getMatchedLexicalElements()
getMatchedLexicalElements retrieves the lexicalElements of a Phrase that participated within a match from this candidate to the Phrase This lexical elements returned are the original elements from the Phrase. |
Token[] |
getMatchedTokens()
getMatchedTokens retrieves the tokens of a Phrase that participated within a match from this candidate to the Phrase This tokens returned are the original tokens from the Phrase. |
java.util.ArrayList |
getMatchedVariants()
getMatchedVariants retrieves the Variant|token mappings that participated in this match. |
java.util.Vector |
getMatchMaps()
Method getMatchMaps returns the vector of lexical elements that make up the MatchMap list for this candidate. |
java.lang.String[] |
getMeshTreeCodes()
Method getMeshTreeCodes |
int |
getMyCandSpan()
Method getMyCandSpan |
int |
getMyPhraseSpan()
Method getMyPhraseSpan |
java.lang.String |
getNumConnected()
Method getNumConnected |
int |
getNumValidMaps()
Method getNumValidMaps |
int |
getNumWords()
Method getNumWords |
java.lang.String |
getPhraseNumConnected(int sizeOfPhrase)
Method getPhraseNumConnected |
int |
getPhrasePos()
Method getPhrasePos |
int |
getPosCheckSumValue()
Method getPosCheckSumValue |
boolean |
getPosCheckValue(int pos)
Method getPosCheckValue |
int |
getReferencePos()
Method getReferencePos |
java.lang.String |
getRestrictedSourcesList(gov.nih.nlm.nls.utils.GlobalBehavior pSettings)
Method getRestrictedSourcesList retrieves those (unique) sources for this cui candidate that are from the restrict to source list. |
UMLS_SemanticTypePointer[] |
getSemanticTypes()
Method getSemanticTypes retrieve the Semantic Types |
java.lang.String |
getSemCode()
Method getSemCode Return the Semantic Code for this candidate. |
java.lang.String |
getSemDefn()
Method getSemDefn Return the Semantic Definition for this candidate. |
UMLSSourceInfo[] |
getSources()
Method getSources retrieves valid sources for this sui|cui candidate |
java.lang.String |
getSourcesAndTermTypes()
Method getSourcesAndTermTypes retrieves the (source|term type, ) pairs for this cui candidate in a comma separated list of term types. |
java.lang.String |
getSTR()
Method getSTR retrieves the UMLS String Name for this candidate. |
java.lang.String |
getSUI()
Method getSUI |
java.lang.String |
getSuis()
Method getSuis retrieves suis, and if the sources have been retrieved, the sources of the suis |
java.util.Vector |
getTokens()
getTokens retrieves the nlp.tokenized CandidateTokens that make up this candidate |
java.lang.String |
getTreeCodes()
Method getTreeCodes |
java.lang.String |
getUMLS_ConceptName()
Method getUMLS_ConceptName retrieves the UMLS Concept Name, which is the prefered string from the concept. |
UMLS_ConceptPointer |
getUMLS_ConceptPointer()
Method getUMLS_ConceptPointer retrieves the UMLS_ConceptPointer from this candidate. |
UMLS_SemanticTypePointer[] |
getUMLS_SemanticTypes()
Method getUMLS_SemanticTypes Return the Semantic Definition for this candidate. |
java.lang.String |
getUMLS_StringName()
Method getUMLSStringName retrieves the UMLS String Name. |
UMLS_StringPointer |
getUMLS_StringPointer()
Method getUMLS_StringPointer retrieves the UMLS_StringPointer from this candidate. |
java.lang.String |
getUMLSConceptName()
Method getUMLSConceptName retrieves the concept name which is the preferred string of the preferred term of all the terms from the concept. |
UMLS_StringPointer |
getUMLSStringPointer()
Method getUMLSStringPointer retrieves the candidate's reference to the UMLSStringPointer |
boolean |
getUsedAtAll()
Method getUsedAtAll |
boolean |
getUsedLocally()
Method getUsedLocally |
java.lang.String |
getValidSourcesList()
Method getValidSourcesList retrieves valid (unique) sources for this cui|sui candidate in a comma separated list of source abbreviations |
double |
getVariation()
Method getVariation Return the variation value for this candidate. |
boolean |
isCompleted(int sizeOfPhrase)
Method isCompleted Determine whether we have finished completing the segment matching for this candidate. |
boolean |
isConceptGap(int sizeOfPhrase)
Method isConceptGap A concept gap is defined as: A candidate with non-matching words occurring in the middle of the candidate. |
boolean |
isHead()
Method isHead returns whether this candidate's span includes the head of the query phrase. |
boolean |
isInOrder(int sizeOfPhrase)
Method isInOrder This verifies that the matches between the candidate and the phrase are done in the same left to right ordering. |
boolean |
isOverMatch(int sizeOfPhrase)
Method isOverMatch An overmatch is defined as A candidate with non-matching words on one end of the candidate. |
boolean |
isPosAlreadySetinMatchMap(int pPos)
Method isPosAlreadySetinMatchMap |
void |
printFieldedListing(int sizeOfPhrase,
gov.nih.nlm.nls.utils.GlobalBehavior settings,
java.lang.String prefix)
Method printFieldedListing |
void |
printFinalNumConnectedString(int sizeOfPhrase,
gov.nih.nlm.nls.utils.GlobalBehavior settings)
Method printFinalNumConnectedString |
void |
printFullCandidate(Phrase aPhrase,
gov.nih.nlm.nls.utils.GlobalBehavior settings)
Method printFullCandidate |
void |
printListing(gov.nih.nlm.nls.utils.GlobalBehavior settings,
boolean doNumsFlag,
int numPos)
Method printListing |
void |
printMatchMapDebugString(boolean nlFlag,
gov.nih.nlm.nls.utils.GlobalBehavior settings)
Method printMatchMapDebugString |
void |
printMoListing(int sizeOfPhrase,
gov.nih.nlm.nls.utils.GlobalBehavior settings)
Method printMoListing |
void |
printNumConnectedString(int sizeOfPhrase,
gov.nih.nlm.nls.utils.GlobalBehavior settings)
Method printNumConnectedString |
void |
setAddedNew(boolean flag)
Method setAddedNew |
void |
setCentrality()
Method setCentrality The centrality value is simply 1 if the string involves the head of the phrase and 0 otherwise. |
void |
setConcept(java.lang.String CONCEPT)
Method setConcept |
void |
setCUI(java.lang.String CUI)
Method setCUI |
void |
setCuiHash(int pCui)
Method setCuiHash sets the cui as an int. |
void |
setIsHead(boolean flag)
Method setIsHead |
void |
setNumConnected()
Method setNumConnected |
void |
setNumValidMaps(int numValidMaps)
Method setNumValidMaps |
void |
setNumWords(int numWords)
Method setNumWords |
void |
setPosCheck(boolean[] posCheck,
int sizeOfPhrase)
Method setPosCheck NOTE: Setting up the posCheckSum as a binary counter/sum of what positions are actually set in posCheck. |
void |
setReferencePos(int referencePos)
Method setReferencePos |
void |
setSemanticInfo(java.lang.String semCode,
java.lang.String semDefn)
Method setSemanticInfo Set the Semantic code and definition for this candidate. |
void |
setSemanticTypes(UMLS_SemanticTypePointer[] pSemanticTypes)
Method setSemanticTypes Set the Semantic Types |
void |
setTokens(java.util.Vector pTokens)
setTokens adds a set of CandidateTokens as tokenized by the nlp.tokenizer |
void |
setTreeCodes(java.lang.String TreeCodes)
Method setTreeCodes |
void |
setTreeCodes(java.lang.String[] pTreeCodes)
Method setTreeCodes |
void |
setUMLS_StringPointer(UMLS_StringPointer pStringPointer)
Method setUMLS_StringPointer attaches a UMLS_StringPointer to this candidate. |
void |
setUMLSConceptPointer(UMLS_ConceptPointer pConceptPointer)
Method setUMLS_ConceptPointer attaches a UMLS_ConceptPointer to this candidate. |
void |
setUsedAtAll(boolean flag)
Method setUsedAtAll |
void |
setUsedLocally(boolean flag)
Method setUsedLocally |
void |
sortMatchMap()
Method sortMatchMap |
java.lang.String |
toMetaMapString()
Method toMetaMapString |
java.lang.String |
toPipedString()
Method toPipedString |
java.lang.String |
toString()
toString will print finalScore|cui|ConceptName|String|SemanticType(s)|MeSHTreeNumber(s)| |
void |
toString(int sizeOfPhrase,
gov.nih.nlm.nls.utils.GlobalBehavior settings)
Method toString |
void |
toStringDebug(int sizeOfPhrase,
gov.nih.nlm.nls.utils.GlobalBehavior settings)
Method toStringDebug |
void |
updatePosCheck(int sizeOfPhrase)
updatePosCheck |
| Methods inherited from class gov.nih.nlm.nls.nlp.textfeatures.MmObject |
|---|
appendOriginalString, getCharOffset, getId, getLabel, getOriginalString, getSpan, getStrippedString, getTrimmedString, setId, setLabel, setOriginalString, setSpan, setStrippedString, setTrimmedString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Candidate(java.lang.String SUI,
java.lang.String NMSTR,
java.lang.String STR,
java.lang.String CONCEPT,
int distance,
int phrasePos,
boolean DEBUG)
SUI - NMSTR - STR - CONCEPT - distance - phrasePos - DEBUG -
public Candidate(java.lang.String NMSTR,
java.lang.String STR,
int distance,
int phrasePos,
boolean DEBUG)
NMSTR - STR - distance - phrasePos - DEBUG -
public Candidate(java.lang.String SUI,
java.lang.String NMSTR,
java.lang.String STR,
int distance,
int phrasePos,
boolean DEBUG)
SUI - NMSTR - STR - distance - phrasePos - DEBUG -
public Candidate(Candidate aCandidate,
int refCandidatePos,
int sizeOfPhrase,
boolean DEBUG)
aCandidate - A candidate to be copied.refCandidatePos - A pointer into the candidate list.sizeOfPhrase - The size of the parent NP phrase.DEBUG - | Method Detail |
|---|
public java.lang.String getNumConnected()
public int getMyPhraseSpan()
public int getMyCandSpan()
public java.lang.String getLOW()
public java.lang.String getSTR()
public java.lang.String getConcept()
public java.lang.String getUMLSConceptName()
public void setConcept(java.lang.String CONCEPT)
CONCEPT - public void setUMLSConceptPointer(UMLS_ConceptPointer pConceptPointer)
pConceptPointer - public UMLS_ConceptPointer getUMLS_ConceptPointer()
public int getReferencePos()
public void setReferencePos(int referencePos)
referencePos - public java.lang.String getCUI()
public java.lang.String getSUI()
public java.lang.String getTreeCodes()
public void setCUI(java.lang.String CUI)
CUI - public void setCuiHash(int pCui)
pCui - public int getCuiHash()
public void setTreeCodes(java.lang.String TreeCodes)
TreeCodes - public void setTreeCodes(java.lang.String[] pTreeCodes)
pTreeCodes - public java.lang.String[] getMeshTreeCodes()
public int getPhrasePos()
public int getDistValue()
public int getCentrality()
public void addMatchMap(MatchMap aMatchMap)
aMatchMap -
public void addMatchedVariant(Variant pVariant,
java.util.List pPartialCandidateWordTokens)
pVariant - pPartialCandidateWordTokens - public java.util.ArrayList getMatchedLexicalElements()
public java.util.ArrayList getMatchedVariants()
public java.util.ArrayList findMatchingCandidateTokens(java.util.List pPartialCandidateWordTokens)
pPartialCandidateWordTokens -
public void addMatchedToken(Token pToken,
java.util.List pPartialCandidateTokens)
pToken - pPartialCandidateTokens - public Token[] getMatchedTokens()
public void setTokens(java.util.Vector pTokens)
pTokens - public java.util.Vector getTokens()
public void updatePosCheck(int sizeOfPhrase)
sizeOfPhrase - public final java.util.Vector getMatchMaps()
public int getNumWords()
public void setNumWords(int numWords)
numWords - Number of words in the NMSTR for this candidate.public int getNumValidMaps()
public void setNumValidMaps(int numValidMaps)
numValidMaps - Number of valid maps for this candidate.public void setIsHead(boolean flag)
flag - Whether this candidate's span includes the head.public void setCentrality()
public void setPosCheck(boolean[] posCheck,
int sizeOfPhrase)
posCheck - sizeOfPhrase - public boolean getPosCheckValue(int pos)
pos - Position of posCheck to return value for.
public java.lang.String getFinal_strString()
public int getPosCheckSumValue()
public boolean isHead()
public boolean containsHead()
public boolean isInOrder(int sizeOfPhrase)
sizeOfPhrase - Number of words in parent phrase.
public boolean isOverMatch(int sizeOfPhrase)
sizeOfPhrase - Number of words in parent phrase.
public void doCandidatePosCheck(boolean flag)
flag - public void setNumConnected()
public boolean isConceptGap(int sizeOfPhrase)
sizeOfPhrase - Number of words in parent phrase.
public void computeVariation()
public double getVariation()
public void computeCoverage(int sizeOfPhrase)
sizeOfPhrase - Number of words in parent phrase.public double getCoverage()
public void computeInvolvement(int sizeOfPhrase)
sizeOfPhrase - Number of words in parent phrase.public double getInvolvement()
public void computeCohesiveness(int sizeOfPhrase,
gov.nih.nlm.nls.utils.GlobalBehavior settings)
sizeOfPhrase - Number of words in parent phrase.settings -
public void computeFinalCohesiveness(Phrase aPhrase,
int sizeOfPhrase,
gov.nih.nlm.nls.utils.GlobalBehavior settings)
aPhrase - sizeOfPhrase - settings - public double getCohesiveness()
public void computeFinalScore(gov.nih.nlm.nls.utils.GlobalBehavior settings,
boolean strFlag)
settings - strFlag -
public void computeFinalScore(gov.nih.nlm.nls.utils.GlobalBehavior settings,
boolean pIsExactMatch,
boolean strFlag)
settings - pIsExactMatch - strFlag - public int getFinalScore()
public int getCandidateScore()
public void doFinalScoring(gov.nih.nlm.nls.utils.GlobalBehavior settings,
Phrase aPhrase,
int sizeOfPhrase)
settings - aPhrase - sizeOfPhrase -
public void setSemanticInfo(java.lang.String semCode,
java.lang.String semDefn)
semCode - semDefn - public void setSemanticTypes(UMLS_SemanticTypePointer[] pSemanticTypes)
pSemanticTypes - public UMLS_SemanticTypePointer[] getSemanticTypes()
public java.lang.String getUMLS_StringName()
public void setUMLS_StringPointer(UMLS_StringPointer pStringPointer)
pStringPointer - public UMLS_StringPointer getUMLS_StringPointer()
public java.lang.String getUMLS_ConceptName()
public java.lang.String getSemCode()
public java.lang.String getSemDefn()
public UMLS_SemanticTypePointer[] getUMLS_SemanticTypes()
public void setAddedNew(boolean flag)
flag - Determines true/falsepublic void setUsedLocally(boolean flag)
flag - Determines true/falsepublic void setUsedAtAll(boolean flag)
flag - - Determines true/falsepublic boolean getAddedNew()
public boolean getUsedLocally()
public boolean getUsedAtAll()
public boolean fillsOpening(Candidate aCandidate,
int sizeOfPhrase,
int candPos)
aCandidate - Compare againstsizeOfPhrase - Size of parent phrase trying to fillcandPos - Position in the candidate phrase
public void addToCandidate(Candidate aCandidate,
int refCandidatePos,
int sizeOfPhrase)
aCandidate - refCandidatePos - sizeOfPhrase - public void sortMatchMap()
public boolean isCompleted(int sizeOfPhrase)
sizeOfPhrase - Size of parent phrase trying to fill
public boolean isPosAlreadySetinMatchMap(int pPos)
pPos -
public void printMatchMapDebugString(boolean nlFlag,
gov.nih.nlm.nls.utils.GlobalBehavior settings)
nlFlag - settings -
public void printNumConnectedString(int sizeOfPhrase,
gov.nih.nlm.nls.utils.GlobalBehavior settings)
sizeOfPhrase - settings -
public void printFinalNumConnectedString(int sizeOfPhrase,
gov.nih.nlm.nls.utils.GlobalBehavior settings)
sizeOfPhrase - settings - public java.lang.String getPhraseNumConnected(int sizeOfPhrase)
sizeOfPhrase -
public void printListing(gov.nih.nlm.nls.utils.GlobalBehavior settings,
boolean doNumsFlag,
int numPos)
settings - doNumsFlag - numPos -
public void printMoListing(int sizeOfPhrase,
gov.nih.nlm.nls.utils.GlobalBehavior settings)
sizeOfPhrase - settings -
public void printFieldedListing(int sizeOfPhrase,
gov.nih.nlm.nls.utils.GlobalBehavior settings,
java.lang.String prefix)
sizeOfPhrase - settings - prefix -
public void toString(int sizeOfPhrase,
gov.nih.nlm.nls.utils.GlobalBehavior settings)
sizeOfPhrase - settings - public java.lang.String toString()
toString in class MmObject
public void toStringDebug(int sizeOfPhrase,
gov.nih.nlm.nls.utils.GlobalBehavior settings)
sizeOfPhrase - settings -
public void printFullCandidate(Phrase aPhrase,
gov.nih.nlm.nls.utils.GlobalBehavior settings)
aPhrase - settings - public java.lang.String toMetaMapString()
public java.lang.String toPipedString()
public UMLS_StringPointer getUMLSStringPointer()
public UMLSSourceInfo[] getSources()
public UMLSSourceInfo[] getAllSources()
public java.lang.String getAllSourcesList()
public java.lang.String getRestrictedSourcesList(gov.nih.nlm.nls.utils.GlobalBehavior pSettings)
pSettings -
public java.lang.String getSourcesAndTermTypes()
public java.lang.String getValidSourcesList()
public java.lang.String getSuis()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||