dragon.nlp
Class Term

java.lang.Object
  |
  +--dragon.nlp.Term
All Implemented Interfaces:
java.lang.Comparable, Concept, FrequencySortable, IndexSortable, SortedElement, WeightSortable

public class Term
extends java.lang.Object
implements Concept, java.lang.Comparable, SortedElement

Term is designed for Universal Medical Langauge System (UMLS) medical concept that can stores n-grams and its semantic and statistical information

Copyright: Copyright (c) 2003

Company: IST, Drexel University

Version:
1.0
Author:
Davis Zhou

Field Summary
static int NAME_ASIS
           
static int NAME_LEMMA
           
static int NAME_NORM
           
 
Fields inherited from interface dragon.nlp.Concept
TYPE_PHRASE, TYPE_TERM, TYPE_TOKEN
 
Constructor Summary
Term(Word word)
           
Term(Word starting, Word ending)
           
 
Method Summary
 void addAttribute(Term attr)
           
 void addFrequency(int inc)
           
 int compareTo(java.lang.Object obj)
           
 int compareTo(Term term)
           
 Concept copy()
           
 boolean equalTo(Concept concept)
           
 Term getAttribute(int index)
           
 int getAttributeNum()
           
 int getAttributeOccurrence()
           
 java.lang.String[] getCandidateCUI()
           
 java.lang.String getCandidateCUI(int index)
           
 int getCandidateCUINum()
           
 java.lang.String[] getCandidateTUI()
           
 java.lang.String getCandidateTUI(int index)
           
 int getCandidateTUINum()
           
 int getConceptType()
          Return 1 for ontological term, 2 for multiword phrase, and 3 for token
 java.lang.String getCUI()
           
 Word getEndingWord()
          Gets the last word of the concept.
 java.lang.String getEntryID()
           
 int getFrequency()
           
 int getIndex()
           
 java.lang.Object getMemo()
           
 java.lang.String getName()
           
 Term getReferral()
           
 java.lang.String getSemanticType()
           
 int getSenseNum()
           
 Word getStartingWord()
          Gets the first word of the concept.
 java.lang.String getTUI()
           
 double getWeight()
           
 int getWordNum()
           
 int hashCode()
           
 boolean isExpired()
           
 boolean isPredicted()
           
 boolean isSubConcept()
           
 void setCandidateCUI(java.lang.String[] can_cui)
           
 void setCandidateTUI(java.lang.String[] can_tui)
           
 void setCUI(java.lang.String cui)
           
 void setExpired(boolean expired)
           
 void setFrequency(int freq)
           
 void setIndex(int index)
           
 void setMemo(java.lang.Object memo)
           
static void setNameMode(int mode)
           
 void setNormalizedString(java.lang.String normalizedStr)
           
 void setPredictedTerm(boolean predicted)
           
 void setReferral(Term referral)
           
 void setSubConcept(boolean subterm)
           
 void setTUI(java.lang.String tui)
           
 void setWeight(double weight)
           
 java.lang.String toLemmaString()
           
 java.lang.String toNormalizedString()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

NAME_ASIS

public static final int NAME_ASIS
See Also:
Constant Field Values

NAME_LEMMA

public static final int NAME_LEMMA
See Also:
Constant Field Values

NAME_NORM

public static final int NAME_NORM
See Also:
Constant Field Values
Constructor Detail

Term

public Term(Word starting,
            Word ending)

Term

public Term(Word word)
Method Detail

copy

public Concept copy()
Specified by:
copy in interface Concept

getConceptType

public int getConceptType()
Description copied from interface: Concept
Return 1 for ontological term, 2 for multiword phrase, and 3 for token

Specified by:
getConceptType in interface Concept
Returns:
the concept type

setNameMode

public static void setNameMode(int mode)

compareTo

public int compareTo(java.lang.Object obj)
Specified by:
compareTo in interface java.lang.Comparable

compareTo

public int compareTo(Term term)

isSubConcept

public boolean isSubConcept()
Specified by:
isSubConcept in interface Concept

setSubConcept

public void setSubConcept(boolean subterm)

getName

public java.lang.String getName()
Specified by:
getName in interface Concept
Returns:
the descriptive name of the concept

getEntryID

public java.lang.String getEntryID()
Specified by:
getEntryID in interface Concept
Returns:
the unique entry id, usually for ontological terms.

getSemanticType

public java.lang.String getSemanticType()
Specified by:
getSemanticType in interface Concept
Returns:
the semantic type such as proteins, genes, usually for ontological terms.

getIndex

public int getIndex()
Specified by:
getIndex in interface Concept

setIndex

public void setIndex(int index)
Specified by:
setIndex in interface Concept

isPredicted

public boolean isPredicted()

setPredictedTerm

public void setPredictedTerm(boolean predicted)

isExpired

public boolean isExpired()

setExpired

public void setExpired(boolean expired)

setWeight

public void setWeight(double weight)
Specified by:
setWeight in interface Concept

getWeight

public double getWeight()
Specified by:
getWeight in interface Concept

getCandidateCUI

public java.lang.String[] getCandidateCUI()

getCandidateCUI

public java.lang.String getCandidateCUI(int index)

getCandidateCUINum

public int getCandidateCUINum()

setCandidateCUI

public void setCandidateCUI(java.lang.String[] can_cui)

getCUI

public java.lang.String getCUI()

setCUI

public void setCUI(java.lang.String cui)

getSenseNum

public int getSenseNum()

getCandidateTUI

public java.lang.String[] getCandidateTUI()

getCandidateTUI

public java.lang.String getCandidateTUI(int index)

getCandidateTUINum

public int getCandidateTUINum()

setCandidateTUI

public void setCandidateTUI(java.lang.String[] can_tui)

getTUI

public java.lang.String getTUI()

setTUI

public void setTUI(java.lang.String tui)

getStartingWord

public Word getStartingWord()
Description copied from interface: Concept
Gets the first word of the concept. Phrases and ontological terms could have multiple words.

Specified by:
getStartingWord in interface Concept
Returns:
the first word of the underlying concept

getEndingWord

public Word getEndingWord()
Description copied from interface: Concept
Gets the last word of the concept. Phrases and ontological terms could have multiple words.

Specified by:
getEndingWord in interface Concept
Returns:
the last word of the underlying concept

getMemo

public java.lang.Object getMemo()
Specified by:
getMemo in interface Concept

setMemo

public void setMemo(java.lang.Object memo)
Specified by:
setMemo in interface Concept

getReferral

public Term getReferral()

setReferral

public void setReferral(Term referral)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

toLemmaString

public java.lang.String toLemmaString()

setNormalizedString

public void setNormalizedString(java.lang.String normalizedStr)

toNormalizedString

public java.lang.String toNormalizedString()

getWordNum

public int getWordNum()

addFrequency

public void addFrequency(int inc)
Specified by:
addFrequency in interface Concept

getFrequency

public int getFrequency()
Specified by:
getFrequency in interface Concept

setFrequency

public void setFrequency(int freq)
Specified by:
setFrequency in interface Concept

equalTo

public boolean equalTo(Concept concept)
Specified by:
equalTo in interface Concept

getAttributeNum

public int getAttributeNum()

getAttributeOccurrence

public int getAttributeOccurrence()

getAttribute

public Term getAttribute(int index)

addAttribute

public void addAttribute(Term attr)

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object