dragon.nlp.ontology
Class BasicOntology

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

public class BasicOntology
extends AbstractOntology

Basic Ontology can be called directly for basic operations of a given ontology

Description:

Copyright: Copyright (c) 2005

Company: IST, Drexel University

Version:
1.0
Author:
Davis Zhou

Constructor Summary
BasicOntology(java.lang.String termFilename, Lemmatiser lemmatiser)
           
 
Method Summary
 java.util.ArrayList findAllTerms(Word starting)
          Finds out all terms beginning with the given word
 java.util.ArrayList findAllTerms(Word starting, Word ending)
          Finds out all terms between the starting word and the ending word.
 Term findTerm(Word starting)
          Finds the longest term starting with the given word.
 Term findTerm(Word start, Word end)
          Finds the longest term starting with given word and ending no later than the given word.
 java.lang.String[] getCUI(java.lang.String term)
          Gets all possible concept ids the specified term has
 java.lang.String[] getCUI(Word starting, Word ending)
          Gets all possible concept ids the specified term has
 java.lang.String[] getSemanticType(java.lang.String cui)
          Gets all possible semantic types of the given concept
 java.lang.String[] getSemanticType(java.lang.String[] cuis)
          Gets all possible semantic types of the given concepts
 boolean isTerm(java.lang.String term)
          Tests if the given term is defined in the ontology.
 boolean isTerm(Word starting, Word ending)
          Tests if the term specified by the starting word and the ending word is a term in the ontology.
 
Methods inherited from class dragon.nlp.ontology.AbstractOntology
buildString, getAdjectiveTermOption, getCoordinateOption, getLemma, getLemmaOption, getNonBoundaryPunctuation, getNPPOption, getSemanticNet, getSenseDisambiguationOption, getSimilarityMetric, isBoundaryWord, isStartingWord, isUsefulForTerm, setAdjectiveTermOption, setCoordinateOption, setLemmaOption, setNonBoundaryPunctuation, setNPPOption, setSenseDisambiguationOption
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicOntology

public BasicOntology(java.lang.String termFilename,
                     Lemmatiser lemmatiser)
Method Detail

getSemanticType

public java.lang.String[] getSemanticType(java.lang.String[] cuis)
Description copied from interface: Ontology
Gets all possible semantic types of the given concepts

Parameters:
cuis - the set of concepts
Returns:
all possible semantic types of the given concepts

getSemanticType

public java.lang.String[] getSemanticType(java.lang.String cui)
Description copied from interface: Ontology
Gets all possible semantic types of the given concept

Parameters:
cui - the concept id
Returns:
all possible semantic types of the given concept.

getCUI

public java.lang.String[] getCUI(java.lang.String term)
Description copied from interface: Ontology
Gets all possible concept ids the specified term has

Parameters:
term - the term for testing
Returns:
all possible concept ids if the specified term exists in the ontology, otherwise null

getCUI

public java.lang.String[] getCUI(Word starting,
                                 Word ending)
Description copied from interface: Ontology
Gets all possible concept ids the specified term has

Parameters:
starting - the starting word of the term.
ending - the ending word of the term.
Returns:
all possible concept ids if the specified term exists in the ontology, otherwise null

isTerm

public boolean isTerm(java.lang.String term)
Description copied from interface: Ontology
Tests if the given term is defined in the ontology.

Parameters:
term - the term for testing
Returns:
true if the given term is defined in the ontology.

isTerm

public boolean isTerm(Word starting,
                      Word ending)
Description copied from interface: Ontology
Tests if the term specified by the starting word and the ending word is a term in the ontology.

Parameters:
starting - the starting word of the term.
ending - the ending word of the term.
Returns:
true if the term is defined in the ontology.

findTerm

public Term findTerm(Word starting)
Description copied from interface: Ontology
Finds the longest term starting with the given word.

Parameters:
starting - the starting word
Returns:
the term if exists, otherwise null

findTerm

public Term findTerm(Word start,
                     Word end)
Description copied from interface: Ontology
Finds the longest term starting with given word and ending no later than the given word.

Parameters:
start - the starting word
end - the ending word
Returns:
the term if exists, otherwise null

findAllTerms

public java.util.ArrayList findAllTerms(Word starting)
Description copied from interface: Ontology
Finds out all terms beginning with the given word

Parameters:
starting - the starting word
Returns:
a list of terms

findAllTerms

public java.util.ArrayList findAllTerms(Word starting,
                                        Word ending)
Description copied from interface: Ontology
Finds out all terms between the starting word and the ending word.

Parameters:
starting - the starting word
ending - the ending word
Returns:
a list of terms