dragon.nlp.ontology
Class AbstractOntology

java.lang.Object
  |
  +--dragon.nlp.ontology.AbstractOntology
All Implemented Interfaces:
Ontology
Direct Known Subclasses:
BasicOntology, UmlsOntology

public abstract class AbstractOntology
extends java.lang.Object
implements Ontology

The class implements all the basic functions related with ontology

Copyright: Copyright (c) 2005

Company: IST, Drexel University

Version:
1.0
Author:
Davis Zhou

Constructor Summary
AbstractOntology(Lemmatiser lemmatiser)
           
 
Method Summary
protected  java.lang.String buildString(Word start, Word end, boolean useLemma)
           
 boolean getAdjectiveTermOption()
          Gets the option whether adjective term is allowed.
 boolean getCoordinateOption()
          Gets the option whether a term can contain a conjunction.
protected  java.lang.String getLemma(Word word)
           
 boolean getLemmaOption()
          Gets the option of using the base form of the word when matching a term.
 java.lang.String getNonBoundaryPunctuation()
           
 boolean getNPPOption()
          Gets the option whether NPP term is allowed.
 SemanticNet getSemanticNet()
          Gets the semantic network of the ontology
 boolean getSenseDisambiguationOption()
          Gets the option disambiguating the sense of extracted terms.
 SimilarityMetric getSimilarityMetric()
          Get the similarity metric of the ontology
protected  boolean isBoundaryWord(Word curWord)
           
 boolean isStartingWord(Word cur)
          Tests if the current word could be a starting word of a term.
protected  boolean isUsefulForTerm(Word word)
           
 void setAdjectiveTermOption(boolean enabled)
          Sets the option whether adjective term is allowed.
 void setCoordinateOption(boolean enabled)
          Sets the option whether a term can contain a conjunction.
 void setLemmaOption(boolean enabled)
          Sets the option of using the base form of the word when matching a term.
 void setNonBoundaryPunctuation(java.lang.String punctuations)
           
 void setNPPOption(boolean enabled)
          Sets the option whether NPP term is allowed.
 void setSenseDisambiguationOption(boolean enabled)
          Sets the option disambiguating the sense of extracted terms.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface dragon.nlp.ontology.Ontology
findAllTerms, findAllTerms, findTerm, findTerm, getCUI, getCUI, getSemanticType, getSemanticType, isTerm, isTerm
 

Constructor Detail

AbstractOntology

public AbstractOntology(Lemmatiser lemmatiser)
Method Detail

getSemanticNet

public SemanticNet getSemanticNet()
Description copied from interface: Ontology
Gets the semantic network of the ontology

Specified by:
getSemanticNet in interface Ontology
Returns:
the semantic network

getSimilarityMetric

public SimilarityMetric getSimilarityMetric()
Description copied from interface: Ontology
Get the similarity metric of the ontology

Specified by:
getSimilarityMetric in interface Ontology
Returns:
the term smilarity metric

setNonBoundaryPunctuation

public void setNonBoundaryPunctuation(java.lang.String punctuations)

getNonBoundaryPunctuation

public java.lang.String getNonBoundaryPunctuation()

setLemmaOption

public void setLemmaOption(boolean enabled)
Description copied from interface: Ontology
Sets the option of using the base form of the word when matching a term.

Specified by:
setLemmaOption in interface Ontology
Parameters:
enabled - the option of using the base form of the word when matching a term.

getLemmaOption

public boolean getLemmaOption()
Description copied from interface: Ontology
Gets the option of using the base form of the word when matching a term.

Specified by:
getLemmaOption in interface Ontology
Returns:
true if the base form of words is used when matching a term.

setSenseDisambiguationOption

public void setSenseDisambiguationOption(boolean enabled)
Description copied from interface: Ontology
Sets the option disambiguating the sense of extracted terms.

Specified by:
setSenseDisambiguationOption in interface Ontology
Parameters:
enabled - the option disambiguating the sense of extracted terms.

getSenseDisambiguationOption

public boolean getSenseDisambiguationOption()
Description copied from interface: Ontology
Gets the option disambiguating the sense of extracted terms.

Specified by:
getSenseDisambiguationOption in interface Ontology
Returns:
true if the ontology disambiguates the sense of extracted terms.

setAdjectiveTermOption

public void setAdjectiveTermOption(boolean enabled)
Description copied from interface: Ontology
Sets the option whether adjective term is allowed.

Specified by:
setAdjectiveTermOption in interface Ontology
Parameters:
enabled - whether adjective term is allowed.

getAdjectiveTermOption

public boolean getAdjectiveTermOption()
Description copied from interface: Ontology
Gets the option whether adjective term is allowed.

Specified by:
getAdjectiveTermOption in interface Ontology
Returns:
true if adjective term is allowed.

setNPPOption

public void setNPPOption(boolean enabled)
Description copied from interface: Ontology
Sets the option whether NPP term is allowed. For example, "bank of america" is a NPP term

Specified by:
setNPPOption in interface Ontology
Parameters:
enabled - the option whether NPP term is allowed.

getNPPOption

public boolean getNPPOption()
Description copied from interface: Ontology
Gets the option whether NPP term is allowed.

Specified by:
getNPPOption in interface Ontology
Returns:
true if NPP term is allowed.

setCoordinateOption

public void setCoordinateOption(boolean enabled)
Description copied from interface: Ontology
Sets the option whether a term can contain a conjunction. For example, the term "the cancer of neck and hand" contains a conjunction.

Specified by:
setCoordinateOption in interface Ontology
Parameters:
enabled - the option whether a term can contain a conjunction

getCoordinateOption

public boolean getCoordinateOption()
Description copied from interface: Ontology
Gets the option whether a term can contain a conjunction.

Specified by:
getCoordinateOption in interface Ontology
Returns:
true if a term can contain a conjunction.

isStartingWord

public boolean isStartingWord(Word cur)
Description copied from interface: Ontology
Tests if the current word could be a starting word of a term.

Specified by:
isStartingWord in interface Ontology
Parameters:
cur - the current word
Returns:
true f the current word could be a starting word of a term.

isBoundaryWord

protected boolean isBoundaryWord(Word curWord)

getLemma

protected java.lang.String getLemma(Word word)

buildString

protected java.lang.String buildString(Word start,
                                       Word end,
                                       boolean useLemma)

isUsefulForTerm

protected boolean isUsefulForTerm(Word word)