org.ceryle.util
Class LexiconImpl
java.lang.Object
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
|
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 |
LexiconImpl
public LexiconImpl()
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 uppartOfSpeech - 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 uppartOfSpeech - 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.