cic.wsd.windowing
Class VascilescuLexicalChain

java.lang.Object
  extended by cic.wsd.windowing.Condition
      extended by cic.wsd.windowing.VascilescuLexicalChain

public class VascilescuLexicalChain
extends Condition

Extracted from the paper " Evaluating Variants of the Lesk Approach for Disambiguating Words". J is a value in [0.0,1.0] that acts as a threshold for creating lexical chains (A lower value will allow an easy integration to the lexical chain). Only words that form a lexical chain with the target word will be selected.

Author:
Francisco Viveros-Jiménez

Field Summary
(package private)  double J
          Margin for the Jaccard similarity coefficient used to measure similarity.
 
Fields inherited from class cic.wsd.windowing.Condition
name, parameters
 
Constructor Summary
VascilescuLexicalChain(java.lang.String parameter)
           
 
Method Summary
 double Jaccard(java.util.ArrayList<java.lang.String> targetWords, java.util.ArrayList<java.lang.String> possibleWords)
          Jaccard similarity coefficient computation between two bag of words.
 boolean satisfiesCondition(AmbiguousWord target, AmbiguousWord possibleWord, java.util.ArrayList<AmbiguousWord> window)
          Function for telling if a word could be added to the window.
 
Methods inherited from class cic.wsd.windowing.Condition
toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

J

double J
Margin for the Jaccard similarity coefficient used to measure similarity.

Constructor Detail

VascilescuLexicalChain

public VascilescuLexicalChain(java.lang.String parameter)
                       throws java.lang.Exception
Parameters:
parameter - The Jaccard score value to be used as a threshold.
Throws:
java.lang.Exception
Method Detail

Jaccard

public double Jaccard(java.util.ArrayList<java.lang.String> targetWords,
                      java.util.ArrayList<java.lang.String> possibleWords)
Jaccard similarity coefficient computation between two bag of words.

Parameters:
targetWords - Bag of words of the base word.
possibleWords - Bag of words of the possible new word of the lexical chain.
Returns:
Jaccard similarity coefficient.

satisfiesCondition

public boolean satisfiesCondition(AmbiguousWord target,
                                  AmbiguousWord possibleWord,
                                  java.util.ArrayList<AmbiguousWord> window)
Description copied from class: Condition
Function for telling if a word could be added to the window.

Specified by:
satisfiesCondition in class Condition
Parameters:
target - Word to be disambiguated.
possibleWord - Word to be added to the window.
window - Current window.
Returns:
True, if the word could be added to the window.