org.eml.sir.rel.disc
Class WordRelatednessMap

java.lang.Object
  extended byorg.eml.sir.rel.disc.WordRelatednessMap
All Implemented Interfaces:
java.io.Serializable

public class WordRelatednessMap
extends java.lang.Object
implements java.io.Serializable

Maps word pairs to relatedness values.

Author:
Hendrik Niederlich (EML-R)
See Also:
Serialized Form

Constructor Summary
WordRelatednessMap()
          Create a new WordRelatednessMap instance.
 
Method Summary
 boolean containsPair(java.lang.String word1, java.lang.String word2)
          Return wether this WordRelatednessMap contains a word pair.
 int getNumberOfPairTokens()
          Get number of pair tokens.
 int getPositFeat()
           
 double getRelatedness(java.lang.String word1, java.lang.String word2)
          Return the relatedness value to a word pair.
 Stemmer getStemmer()
           
 java.lang.String getWrcName()
           
 void incrementNumberOfPairTokens(int number)
          Count the number of pair tokens.
 boolean isIgnoreIrrelevant()
           
 void putPair(java.lang.String word1, java.lang.String word2, double relatedness)
          Adds a word pair to this WordRelatednessMap.
 void setIgnoreIrrelevant(boolean ignoreIrrelevant)
           
 void setPositFeat(int positFeat)
           
 void setStemmer(Stemmer stemmer)
           
 void setWrcName(java.lang.String wrcName)
           
 int size()
          Return the number of word pairs that are realy contained in this WordRelatedness.
 java.lang.String toString()
          Return a String that contains important information about this instance of WordRelatednessMap.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WordRelatednessMap

public WordRelatednessMap()
Create a new WordRelatednessMap instance.

Method Detail

isIgnoreIrrelevant

public boolean isIgnoreIrrelevant()
Returns:
Returns the ignoreIrrelevant.

setIgnoreIrrelevant

public void setIgnoreIrrelevant(boolean ignoreIrrelevant)
Parameters:
ignoreIrrelevant - The ignoreIrrelevant to set.

getPositFeat

public int getPositFeat()
Returns:
Returns the positFeat.

setPositFeat

public void setPositFeat(int positFeat)
Parameters:
positFeat - The positFeat to set.

getStemmer

public Stemmer getStemmer()
Returns:
Returns a new instance of the stemmer.

setStemmer

public void setStemmer(Stemmer stemmer)
Parameters:
stemmer - The stemmer to set.

getWrcName

public java.lang.String getWrcName()
Returns:
Returns the wrcName.

setWrcName

public void setWrcName(java.lang.String wrcName)
Parameters:
wrcName - The wrcName to set.

containsPair

public boolean containsPair(java.lang.String word1,
                            java.lang.String word2)
Return wether this WordRelatednessMap contains a word pair.


putPair

public void putPair(java.lang.String word1,
                    java.lang.String word2,
                    double relatedness)
Adds a word pair to this WordRelatednessMap.


getRelatedness

public double getRelatedness(java.lang.String word1,
                             java.lang.String word2)
Return the relatedness value to a word pair. Word pairs that are not included lead to 0.0.


size

public int size()
Return the number of word pairs that are realy contained in this WordRelatedness. The ones reported with relatedness = 0.0 are not contained!


incrementNumberOfPairTokens

public void incrementNumberOfPairTokens(int number)
Count the number of pair tokens.


getNumberOfPairTokens

public int getNumberOfPairTokens()
Get number of pair tokens.


toString

public java.lang.String toString()
Return a String that contains important information about this instance of WordRelatednessMap.