edu.princeton.wordnet.pojos
Class Utils

java.lang.Object
  extended by edu.princeton.wordnet.pojos.Utils

public class Utils
extends java.lang.Object

Author:
bbou

Constructor Summary
Utils()
           
 
Method Summary
static java.lang.String array2String(java.lang.String[] theseStrings)
          Flatten array of strings to one string
static java.lang.String[] getCasedWords(edu.princeton.wordnet.pojos.Word thisWord)
          Get cased forms for word
static java.lang.String[] getMorphs(edu.princeton.wordnet.pojos.Word thisWord)
          Get morphological forms for word
static java.lang.String[] getWords(edu.princeton.wordnet.pojos.Synset thisSynset)
          Get words in synset
(package private) static java.lang.String lexLink2String(edu.princeton.wordnet.pojos.LexLink thisLexlink)
          Utils lexical link (x R y)
(package private) static java.lang.String lexLink2String(edu.princeton.wordnet.pojos.LexLink thisLexlink, boolean processTarget)
          Utils lexical link (x R y)
(package private) static java.lang.String semLink2String(edu.princeton.wordnet.pojos.SemLink thisSemlink)
          Utils semantic link (x R y)
(package private) static java.lang.String semLink2String(edu.princeton.wordnet.pojos.SemLink thisSemlink, boolean processTarget)
          Utils semantic link (x R y)
(package private) static java.lang.String synset2String(edu.princeton.wordnet.pojos.Synset thisSynset)
          Represent synset as string
(package private) static java.lang.String word2String(edu.princeton.wordnet.pojos.Word thisWord)
          Represent word as string
static java.lang.String[] words2Strings(java.util.Set<edu.princeton.wordnet.pojos.Word> thisWordSet)
          Represent words as string
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Utils

public Utils()
Method Detail

getWords

public static java.lang.String[] getWords(edu.princeton.wordnet.pojos.Synset thisSynset)
Get words in synset

Parameters:
thisSynset - synset
Returns:
array of lemma strings

getMorphs

public static java.lang.String[] getMorphs(edu.princeton.wordnet.pojos.Word thisWord)
Get morphological forms for word

Parameters:
thisWord - word
Returns:
array of morphological strings

getCasedWords

public static java.lang.String[] getCasedWords(edu.princeton.wordnet.pojos.Word thisWord)
Get cased forms for word

Parameters:
thisWord - word
Returns:
array of cased strings

array2String

public static java.lang.String array2String(java.lang.String[] theseStrings)
Flatten array of strings to one string

Parameters:
theseStrings - array of strings
Returns:
string

word2String

static java.lang.String word2String(edu.princeton.wordnet.pojos.Word thisWord)
Represent word as string

Parameters:
thisWord - word
Returns:
string

words2Strings

public static java.lang.String[] words2Strings(java.util.Set<edu.princeton.wordnet.pojos.Word> thisWordSet)
Represent words as string

Parameters:
thisWordSet - word set
Returns:
strings

synset2String

static java.lang.String synset2String(edu.princeton.wordnet.pojos.Synset thisSynset)
Represent synset as string

Parameters:
thisSynset - synset
Returns:
string

semLink2String

static java.lang.String semLink2String(edu.princeton.wordnet.pojos.SemLink thisSemlink)
Utils semantic link (x R y)

Parameters:
thisSemlink - semantic link R
Returns:
string representing link

lexLink2String

static java.lang.String lexLink2String(edu.princeton.wordnet.pojos.LexLink thisLexlink)
Utils lexical link (x R y)

Parameters:
thisLexlink - lexical link R
Returns:
string representing link

semLink2String

static java.lang.String semLink2String(edu.princeton.wordnet.pojos.SemLink thisSemlink,
                                       boolean processTarget)
Utils semantic link (x R y)

Parameters:
thisSemlink - semantic link R
processTarget - whether to process link's target (y) or source (x)
Returns:
string representing link

lexLink2String

static java.lang.String lexLink2String(edu.princeton.wordnet.pojos.LexLink thisLexlink,
                                       boolean processTarget)
Utils lexical link (x R y)

Parameters:
thisLexlink - lexical link R
processTarget - whether to process link's target (y) or source (x)
Returns:
string representing link