|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.smu.tspell.wordnet.WordNetDatabase
A concrete implementation of this class provides access to the WordNet database information.
| Constructor Summary | |
WordNetDatabase()
No-argument constructor. |
|
| Method Summary | |
abstract String[] |
getBaseFormCandidates(String inflection,
SynsetType type)
Returns lemma representing word forms that might be present in WordNet. |
static WordNetDatabase |
getFileInstance()
Returns an implementation of this class that can access the WordNet database by searching files on the local file system. |
Synset[] |
getSynsets(String wordForm)
Returns all synsets that contain the specified word form or a morphological variation of that word form. |
Synset[] |
getSynsets(String wordForm,
SynsetType type)
Returns only the synsets of a particular type (e.g., noun) that contain a word form or morphological variation of that form. |
abstract Synset[] |
getSynsets(String wordForm,
SynsetType type,
boolean useMorphology)
Returns only the synsets of a particular type (e.g., noun) that contain a word form matching the specified text or one of that word form's variants. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public WordNetDatabase()
| Method Detail |
public Synset[] getSynsets(String wordForm)
throws WordNetException
wordForm - Text representing a word or collocation (phrase).
WordNetException - An error occurred retrieving the data.
public Synset[] getSynsets(String wordForm,
SynsetType type)
wordForm - Text representing a word or collocation (phrase).type - Type of synsets (e.g., noun) to return; if this
argument is null, all synsets will be returned
that contain the specified word form.
WordNetException - An error occurred retrieving the data.
public abstract Synset[] getSynsets(String wordForm,
SynsetType type,
boolean useMorphology)
throws WordNetException
wordForm - Text representing a word or collocation (phrase).type - Type of synsets (e.g., noun) to return; if this
argument is null, all synsets will be returned
that contain the specified word form.useMorphology - When true, indicates that this
method should return synsets that contain any morphological
variation of the specified word form; conversely, a value of
false returns in only synsets being returned that
contain the word for exactly as it is specified. In other words,
specifying false indicates that an exact-match-only
approach should be used to determine which synsets to return.
WordNetException - An error occurred retrieving the data.
public abstract String[] getBaseFormCandidates(String inflection,
SynsetType type)
inflection - Irregular inflection for which to return root words.type - Syntactic type for which to perform the lookup.
public static WordNetDatabase getFileInstance()
You can specify the directory location of those files by setting the
wordnet.database.dir system property.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||