|
Qizx fe-4.4p2 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Thesaurus
Access to a thesaurus.
Nested Class Summary | |
---|---|
static class |
Thesaurus.LookupResult
Structure returned by Thesaurus lookup. |
static class |
Thesaurus.Synonym
A synonym associated with an entry in a Thesaurus. |
static class |
Thesaurus.TokenSequence
Sequence of tokens. |
Method Summary | |
---|---|
Thesaurus.LookupResult |
lookup(Thesaurus.TokenSequence tokens)
Looks up a thesaurus for a sequence of tokens. |
Method Detail |
---|
Thesaurus.LookupResult lookup(Thesaurus.TokenSequence tokens)
This method call can consume one or several input tokens, according to the thesaurus entry it recognizes. Therefore, the returned result also contains the number of consumed tokens. Replacement sequences may or may not contain the consumed sequence, this is left to the thesaurus implementation.
For example, if the thesaurus contains equivalences "wealthy", "well-off" and "well-to-do", then looking up the sequence "well off man" would return a LookupResult where consumedTokens = 2 (length of "well off"), and containing the token sequences "wealthy", "well off" and "well to do". (Note that the TextTokenizer is assumed here to cut on hyphens).
tokens
- sequence of source tokens. Each token is an array of
characters rather than a string.
|
© 2010 Axyana Software | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |