gr.demokritos.iit.conceptualIndex
Class LocalWordNetMeaningExtractor

java.lang.Object
  extended by gr.demokritos.iit.conceptualIndex.LocalWordNetMeaningExtractor
All Implemented Interfaces:
IMeaningExtractor

public class LocalWordNetMeaningExtractor
extends java.lang.Object
implements IMeaningExtractor

This class uses locally installed WordNet to extract word definitions.


Constructor Summary
LocalWordNetMeaningExtractor()
          Creates a new instance of LocalWordNetMeaningExtractor, checking there is a reachable WordNet instance installed.
 
Method Summary
 java.lang.String getDefinition(java.lang.String sWord, java.lang.String sPOS, int iSenseNum)
          Returns the definition of a given word, for a given part-of-speech and a predefined sense number.
 java.lang.String getGloss(java.lang.String sWord, java.lang.String sPOS, int iSenseNum)
          Returns the gloss of a given word, for a given part-of-speech and a predefined sense number.
 WordDefinition getMeaning(java.lang.String sString)
          Looks up a word using a locally installed WordNet instance.
 java.lang.String getSenseWords(java.lang.String sWord, java.lang.String sPOS, int iSenseNum)
          Returns the synonym words of a given word, for a given part-of-speech and a predefined sense number.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocalWordNetMeaningExtractor

public LocalWordNetMeaningExtractor()
                             throws java.io.IOException
Creates a new instance of LocalWordNetMeaningExtractor, checking there is a reachable WordNet instance installed.

Throws:
java.io.IOException - If WordNet is not found an appropriate IOException is thrown.
See Also:
IOException
Method Detail

getMeaning

public WordDefinition getMeaning(java.lang.String sString)
Looks up a word using a locally installed WordNet instance.

Specified by:
getMeaning in interface IMeaningExtractor
Parameters:
sString - The string to lookup.
Returns:
The definition of the word being looked up.
See Also:
WordDefinition

getGloss

public java.lang.String getGloss(java.lang.String sWord,
                                 java.lang.String sPOS,
                                 int iSenseNum)
Returns the gloss of a given word, for a given part-of-speech and a predefined sense number.

Parameters:
sWord - The word looked up.
sPOS - Can be verb, noun, adjective or radverb.
iSenseNum - The sense number of interest.
Returns:
A string containing the gloss part of the given sense number, for the given word and part-of-speech.

getDefinition

public java.lang.String getDefinition(java.lang.String sWord,
                                      java.lang.String sPOS,
                                      int iSenseNum)
Returns the definition of a given word, for a given part-of-speech and a predefined sense number.

Parameters:
sWord - The word looked up.
sPOS - Can be verb, noun, adjective or radverb.
iSenseNum - The sense number of interest.
Returns:
A string containing the definition part of the given sense number, for the given word and part-of-speech.

getSenseWords

public java.lang.String getSenseWords(java.lang.String sWord,
                                      java.lang.String sPOS,
                                      int iSenseNum)
Returns the synonym words of a given word, for a given part-of-speech and a predefined sense number.

Parameters:
sWord - The word looked up.
sPOS - Can be verb, noun, adjective or radverb.
iSenseNum - The sense number of interest.
Returns:
A string containing the synonyms part of the given sense number, for the given word and part-of-speech, as the synonyms appear if the gloss parameter is given to the WordNet executable.