emolib.wsd.simlib
Class SimLibWSD

java.lang.Object
  extended by emolib.util.proc.TextDataProcessor
      extended by emolib.wsd.WordSenseDisambiguator
          extended by emolib.wsd.simlib.SimLibWSD
All Implemented Interfaces:
Configurable, DataProcessor

public class SimLibWSD
extends WordSenseDisambiguator

The SimLibWSD class performs the Word Sense Disambiguation (WSD) process using the WordNet Similarity library.

In order to perform this process, the word-sense disambiguator is based on the system proposed by (Seco et al., 2004).

The SimLibWSD class requires a configuration parameter that indicates the location of the necessary files that represent the indexed WordNet structure. SimLibWSD depends on the (adapted) code developed by Nuno Seco for the WordNet Similarity library.

--
(Seco et al., 2004) Seco, N., Veale, T., Hayes, J. (2004) "An Intrinsic Information Content Metric for Semantic Similarity in WordNet". In Proceedings of the European Conference of Artificial Intelligence.

Author:
Alexandre Trilla (atrilla@salle.url.edu)

Field Summary
static java.lang.String PROP_USE_ADJECTIVES
           
static java.lang.String PROP_USE_NOUNS
           
static java.lang.String PROP_USE_VERBS
           
static java.lang.String PROP_WNINDEX_PATH
          The name of the property indicating the path of the WordNet index files needed by the WordNet Similarity library.
 
Constructor Summary
SimLibWSD()
          Main constructor of the SimLibWSD.
 
Method Summary
 void applyWSD(TextData inputTextDataObject)
          Method to perform the word-sense disambiguation process.
 void initialize()
          Method to initialize the SimLibWSD.
 void newProperties(PropertySheet ps)
          This method is called when this configurable component has new data.
 void register(java.lang.String name, Registry registry)
          Register my properties.
 
Methods inherited from class emolib.wsd.WordSenseDisambiguator
getData
 
Methods inherited from class emolib.util.proc.TextDataProcessor
flush, getName, getPredecessor, setPredecessor, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PROP_WNINDEX_PATH

public static final java.lang.String PROP_WNINDEX_PATH
The name of the property indicating the path of the WordNet index files needed by the WordNet Similarity library.

See Also:
Constant Field Values

PROP_USE_NOUNS

public static final java.lang.String PROP_USE_NOUNS
See Also:
Constant Field Values

PROP_USE_VERBS

public static final java.lang.String PROP_USE_VERBS
See Also:
Constant Field Values

PROP_USE_ADJECTIVES

public static final java.lang.String PROP_USE_ADJECTIVES
See Also:
Constant Field Values
Constructor Detail

SimLibWSD

public SimLibWSD()
Main constructor of the SimLibWSD.

Method Detail

register

public void register(java.lang.String name,
                     Registry registry)
              throws PropertyException
Description copied from interface: Configurable
Register my properties. This method is called once early in the time of the component, shortly after the component is constructed. This component should register any configuration properties that it needs to register. If this configurable extends another configurable, super.register should also be called

Specified by:
register in interface Configurable
Overrides:
register in class WordSenseDisambiguator
Parameters:
name - the name of the component
registry - the registry for this component
Throws:
PropertyException

newProperties

public void newProperties(PropertySheet ps)
                   throws PropertyException
Description copied from interface: Configurable
This method is called when this configurable component has new data. The component should first validate the data. If it is bad the component should return false. If the data is good, the component should record the the data internally and return true.

Specified by:
newProperties in interface Configurable
Overrides:
newProperties in class WordSenseDisambiguator
Parameters:
ps - a property sheet holding the new data
Throws:
PropertyException - if there is a problem with the properties.

initialize

public void initialize()
Method to initialize the SimLibWSD.

Specified by:
initialize in interface DataProcessor
Overrides:
initialize in class WordSenseDisambiguator

applyWSD

public void applyWSD(TextData inputTextDataObject)
Method to perform the word-sense disambiguation process. The meaning is taken at paragraph-level (all text obtained from a single acquisition) for all the nouns in the text.

Specified by:
applyWSD in class WordSenseDisambiguator
Parameters:
inputTextDataObject - The TextData object to process.