org.ceryle.util
Interface Lexicon

All Known Implementing Classes:
LexiconImpl

public interface Lexicon

In interace for access to the WordNet 2.0 lexical reference.

Since:
JDK1.3
Version:
$Id: Lexicon.java,v 3.3 2007-06-15 12:09:55 altheim Exp $
Author:
Murray Altheim

Field Summary
static int POS_ADJ
          Indicates a query on adjectives only.
static int POS_ADV
          Indicates a query on adverbs only.
static int POS_ALL
          Indicates a query on all supported parts of speech: noun, verb, adjective and adverb.
static int POS_NOUN
          Indicates a query on nouns only.
static int POS_VERB
          Indicates a query on verbs only.
 
Method Summary
 String getPOSLabel(int pos)
          Returns a label corresponding to the provided POS int code.
 String lookup(String word, int partOfSpeech)
          Look up word and return a richtext (HTML) description from WordNet.
 Set synonymsFor(String word, int partOfSpeech)
          Return a Set containing Strings that are considered synonyms for word.
 

Field Detail

POS_ALL

static final int POS_ALL
Indicates a query on all supported parts of speech: noun, verb, adjective and adverb.

See Also:
Constant Field Values

POS_NOUN

static final int POS_NOUN
Indicates a query on nouns only.

See Also:
Constant Field Values

POS_VERB

static final int POS_VERB
Indicates a query on verbs only.

See Also:
Constant Field Values

POS_ADJ

static final int POS_ADJ
Indicates a query on adjectives only.

See Also:
Constant Field Values

POS_ADV

static final int POS_ADV
Indicates a query on adverbs only.

See Also:
Constant Field Values
Method Detail

lookup

String lookup(String word,
              int partOfSpeech)
Look up word and return a richtext (HTML) description from WordNet.

Parameters:
word - the word to look up
partOfSpeech - a value that determines which part(s) of speech to query

synonymsFor

Set synonymsFor(String word,
                int partOfSpeech)
Return a Set containing Strings that are considered synonyms for word. Returns an empty Set rather than null.

Parameters:
word - the word to look up
partOfSpeech - a value that determines which part(s) of speech to query

getPOSLabel

String getPOSLabel(int pos)
Returns a label corresponding to the provided POS int code. Returns "word" for POS.ALL.



The Ceryle Project. Copyright ©2001-2007 Murray Altheim, All Rights Reserved. See LICENSE included with distribution.