|
Fido Alpha 3.2 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--fido.linguistic.WordLookup
Attempts to find a word string in one of four ways:
WordClassificationTable
,
DictionaryTable
,
LanguageMorphologyTable
Constructor Summary | |
WordLookup()
Creates a new WordLookup instance. |
Method Summary | |
void |
lookupWord(WordPackage word,
java.lang.String language)
The word string is passed to the WordClassificationTable for a regular expression type matching. |
void |
lookupWords(java.util.Vector words,
java.lang.String language)
Calls lookupWord() for each word in the parameter word Vector. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public WordLookup()
Method Detail |
public void lookupWord(WordPackage word, java.lang.String language) throws FidoDatabaseException, GrammarParseException, GrammarLinkNotFoundException, LookupWordFailedException
If no entries are returned from the Dictionary, the word is passed off to the Morphology module. The Morphology module attempts to find a root form of the string the user typed. This includes verb tenses, plurals, and possessives.
If no entries are returned from the Morphology module, the word is assigned UNKNOWN_WORD which has a grammar string. This means the word is not known to the system, but UNKNOWN_WORD contains a grammar string that allows the word to be parsed.
This method is public for the GrammarFrontEnd to be able to lookup one word at a time. For processing commands, the words will be put into a Vector and lookupWords() should be called.
FidoDatabaseException
- Thrown if there is an error contacting or
processing a database request.
GrammarParseException
- Thrown if a word in the Dictionary has
a grammar string that cannot be parsed.
GrammarLinkNotFoundException
- Thrown if a word in the Dictionary
has a grammar link type that is not
found in the GrammarLinkTypes table
LookupWordFailedException
- Thrown if a word cannot be resolved and
the special word UNKNOWN_WORD is not found
either.WordClassificationTable
,
DictionaryTable
,
LanguageMorphologyTable
,
WordSense
,
WordPackage
public void lookupWords(java.util.Vector words, java.lang.String language) throws FidoDatabaseException, GrammarParseException, GrammarLinkNotFoundException, LookupWordFailedException
words
- Vector of WordPackageslanguage
- Language of the words
FidoDatabaseException
- Thrown if there is an error contacting or
processing a database request.
GrammarParseException
- Thrown if a word in the Dictionary has
a grammar string that cannot be parsed.
GrammarLinkNotFoundException
- Thrown if a word in the Dictionary
has a grammar link type that is not
found in the GrammarLinkTypes table
LookupWordFailedException
- Thrown if a word cannot be resolved and
the special word UNKNOWN_WORD is not found
either.DictionaryTable
,
WordPackage
,
WordSense
,
lookupWord(WordPackage, String)
|
Fido Alpha 3.2 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |