de.tuebingen.uni.sfs.germanet.relatedness
Class LexicalField

java.lang.Object
  extended by de.tuebingen.uni.sfs.germanet.relatedness.LexicalField

public class LexicalField
extends java.lang.Object

Does all the calculations for the Lesk relatedness measure.


Constructor Summary
LexicalField(de.tuebingen.uni.sfs.germanet.api.Synset synset, de.tuebingen.uni.sfs.germanet.api.GermaNet gnet, org.tartarus.snowball.SnowballStemmer stemmer, int size, int limit, boolean oneOrthForm, boolean hypernymsOnly, boolean includeGermaNetGloss, boolean includeWiktionaryGlosses)
          Creates a new LexicalField, adding orthForms of this synset and related synsets, as well as glosses included in GermaNet as required by the parameters.
 
Method Summary
 java.util.HashSet<java.lang.String> getField()
          Returns the lexical field, i.e.
 java.lang.String toString()
          Returns the field as a single String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LexicalField

public LexicalField(de.tuebingen.uni.sfs.germanet.api.Synset synset,
                    de.tuebingen.uni.sfs.germanet.api.GermaNet gnet,
                    org.tartarus.snowball.SnowballStemmer stemmer,
                    int size,
                    int limit,
                    boolean oneOrthForm,
                    boolean hypernymsOnly,
                    boolean includeGermaNetGloss,
                    boolean includeWiktionaryGlosses)
Creates a new LexicalField, adding orthForms of this synset and related synsets, as well as glosses included in GermaNet as required by the parameters.

Parameters:
synset - Synset to construct a lexical field for
gnet - an instance of the GermaNet class
oneOrthForm - if set to true, only one orthForm of each synset will be used; if false, all forms will be included in the pseudo-gloss
size - path length: how many related synsets will be included; if size=0 and includeGloss=true, then the LexicalField consists of glosses only
limit - distance from root: how many synset layers will be excluded for being too abstract
hypernymsOnly - if true, use only hypernymy relation; otherwise, use all types of relations except hyponymy
includeGermaNetGloss - if true, GermaNet's own glosses will be included in the pseudo-gloss where they exist
includeWiktionaryGlosses - if true, optionally loaded Wiktionary glosses will be included in the pseudo-gloss where they exist
stemmer - a Stemmer instance (used to increase overlap); if null, no stemming will occur.
Method Detail

getField

public java.util.HashSet<java.lang.String> getField()
Returns the lexical field, i.e. all the words added to this LexicalField instance during initiation.

Returns:
the HashSet of Strings included in this lexical field

toString

public java.lang.String toString()
Returns the field as a single String.

Overrides:
toString in class java.lang.Object
Returns:
all elements in the field concatenated into one String