org.ceryle.util
Class LexiconImpl

java.lang.Object
  extended by org.ceryle.util.LexiconImpl
All Implemented Interfaces:
Lexicon

public class LexiconImpl
extends Object
implements Lexicon

Provides access to the WordNet 2.0 Dictionary.

THIS CLASS HAS BEEN TEMPORARILY DISABLED, AS THE JWORDNET JAR FILE HAS BEEN REMOVED FROM THE DISTRIBUTION PENDING REPLACEMENT BY A DIFFERENT, ACTIVE JWORDNET PROJECT.

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

Field Summary
 
Fields inherited from interface org.ceryle.util.Lexicon
POS_ADJ, POS_ADV, POS_ALL, POS_NOUN, POS_VERB
 
Constructor Summary
LexiconImpl()
           
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LexiconImpl

public LexiconImpl()
Method Detail

getPOSLabel

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

Specified by:
getPOSLabel in interface Lexicon

lookup

public String lookup(String word,
                     int partOfSpeech)
Description copied from interface: Lexicon
Look up word and return a richtext (HTML) description from WordNet.

Specified by:
lookup in interface Lexicon
Parameters:
word - the word to look up
partOfSpeech - a value that determines which part(s) of speech to query

synonymsFor

public Set synonymsFor(String word,
                       int partOfSpeech)
Description copied from interface: Lexicon
Return a Set containing Strings that are considered synonyms for word. Returns an empty Set rather than null.

Specified by:
synonymsFor in interface Lexicon
Parameters:
word - the word to look up
partOfSpeech - a value that determines which part(s) of speech to query


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