rita.support.ifs
Interface RiWordnetIF

All Known Implementing Classes:
RiWordnetImpl, RiWordnetSupport

public interface RiWordnetIF


Method Summary
 boolean exists(java.lang.String word)
          Checks the existence of a 'word' in the ontology
 java.lang.String[] filter(int filterFlag, java.lang.String word, java.lang.String pos)
           
 java.lang.String[] filter(int filterFlag, java.lang.String word, java.lang.String pos, int maxResults)
          Return up to maxResults instances of specified posStr matching the filter specified with filterFlag
 java.lang.String[] getAllAlsoSees(java.lang.String query, java.lang.String pos)
          Returns also-see terms for all senses ofword/pos or null if not found
Holds for nouns (?) & adjectives
Example: happy -> [cheerful, elated, euphoric, felicitous, joyful, joyous...]
 java.lang.String[] getAllAntonyms(java.lang.String word, java.lang.String pos)
          Returns String[] of Antonyms for the 1st sense of word with pos or null if not found
Holds for adjectives only (?)
 java.lang.String[] getAllCoordinates(java.lang.String query, java.lang.String pos)
          Returns coordinate terms for all sense of word/pos, or null if not found
X is a coordinate term of Y if there exists a term Z which is the hypernym of both X and Y.
Examples: blackbird and robin are coordinate terms (since they are both a kind of thrush) gun and bow are coordinate terms (since they are both weapons) fork and spoon are coordinate terms (since they are both cutlery, or eating utensils) hat and helmet are coordinate terms (since they are both a kind of headgear or headdress) Example: arm -> [hind-limb, forelimb, flipper, leg, crus, thigh, arm...]
Holds btwn nouns/nouns and verbs/verbs
 java.lang.String[] getAllDerivedTerms(java.lang.String query, java.lang.String pos)
          Returns derived terms forall senses of word/pos or null if not found
Holds for adverbs
Example: happily -> [jubilant, blithe, gay, mirthful, merry, happy]
 java.lang.String[] getAllExamples(java.lang.CharSequence word, java.lang.CharSequence pos)
          Returns examples for all senses of word with pos if they contain the word, else null if not found
 java.lang.String[] getAllGlosses(java.lang.String word, java.lang.String pos)
          Returns glosses for all senses of 'word' with 'pos', or null if not found
 java.lang.String[] getAllHolonyms(java.lang.String query, java.lang.String pos)
          Returns part-to-whole relationships for all sense of word/pos, or none if not found
X is a meronym of Y if Y has X as a part.
X is a holonym of Y if X has Y as a part.
 java.lang.String[] getAllHypernyms(java.lang.String word, java.lang.String posStr)
          Returns an ordered String[] of hypernym-synsets (each a semi-colon delimited String) up to the root of Wordnet for the 1st sense of the word, or null if not foundsssssss
 java.lang.String[] getAllHyponyms(java.lang.String word, java.lang.String posStr)
          Returns an unordered String[] of hyponym-synsets (each a colon-delimited String), or null if not found
 java.lang.String[] getAllMeronyms(java.lang.String query, java.lang.String pos)
          Returns array of whole-to-part relationships for all senses of word/pos, or null if not found
X is a meronym of Y if Y has X as a part.
X is a holonym of Y if X has Y as a part.
 java.lang.String[] getAllNominalizations(java.lang.String query, java.lang.String pos)
          Returns nominalized terms for all sense of word/pos or null if not found
Refers to the use of a verb or an adjective as a noun.
 java.lang.String[] getAllSimilar(java.lang.String query, java.lang.String pos)
          Returns similar-to list for all sense of word/pos or null if not found
Holds for adjectives
Example:
happy(a) -> [blessed, blissful, bright, golden, halcyon, prosperous...]
 java.lang.String[] getAllSynonyms(int id)
           
 java.lang.String[] getAllSynonyms(int senseId, int maxResults)
          Returns an unordered String[] containing the synset, hyponyms, similars, alsoSees, and coordinate terms (checking each in order), or null if not found.
 java.lang.String[] getAllSynonyms(java.lang.String word, java.lang.String posStr)
           
 java.lang.String[] getAllSynonyms(java.lang.String word, java.lang.String posStr, int maxResults)
          Returns an unordered String[] containing the synset, hyponyms, similars, alsoSees, and coordinate terms (checking each in order) for all senses of word with pos, or null if not found
 java.lang.String[] getAllSynsets(java.lang.String word, java.lang.String posStr)
          Returns String[] of words in each synset for all senses of word with pos, or null if not found
 java.lang.String[] getAllVerbGroups(java.lang.String query, java.lang.String pos)
          Returns verb group for all senses of verb or null if not found
Example: live -> [dwell, inhabit]
Holds for verbs
 java.lang.String[] getAlsoSees(int senseId)
          Returns also-see terms for seseId or null if not found
Holds for nouns (?) & adjectives
Example: happy -> [cheerful, elated, euphoric, felicitous, joyful, joyous...]
 java.lang.String[] getAlsoSees(java.lang.String query, java.lang.String pos)
          Returns also-see terms for 1st sense of word/pos or null if not found
Holds for nouns (?) & adjectives
Example: happy -> [cheerful, elated, euphoric, felicitous, joyful, joyous...]
 java.lang.String[] getAnagrams(java.lang.String word, java.lang.String posStr)
          Returns all full anagram matches for the specified word and pos
 java.lang.String[] getAnagrams(java.lang.String word, java.lang.String posStr, int maxResults)
          Returns up to maxResults full anagram matches for the specified word and pos
 java.lang.String[] getAntonyms(int id)
          Returns String[] of Antonyms for the specified id, or null if not found
Holds for adjectives only (?)
 java.lang.String[] getAntonyms(java.lang.String word, java.lang.String pos)
          Returns String[] of Antonyms for the 1st sense of word with pos or null if not found
Holds for adjectives only (?)
 java.lang.String getAnyExample(java.lang.CharSequence word, java.lang.CharSequence pos)
          Return a random example from the set of examples from all senses of word with pos, assuming they contain word, or else null if not found
 java.lang.String getBestPos(java.lang.String word)
          Returns most-common pos according to polysemy count, returning the pos with the most different senses.
 java.lang.String[] getCommonParents(java.lang.String word1, java.lang.String word2, java.lang.String pos)
          Returns String[] of Common Parents for 1st senses of words with specified pos' or null if not found
 java.lang.String[] getContains(java.lang.String word, java.lang.String posStr)
          Returns all 'contains' matches for the specified word and pos
 java.lang.String[] getContains(java.lang.String word, java.lang.String posStr, int maxResults)
          Returns up to maxResults of the specified pos where each contains the given word
 java.lang.String[] getCoordinates(int id)
          Returns String[] of Coordinates for the specified id, or null if not found
 java.lang.String[] getCoordinates(java.lang.String query, java.lang.String pos)
          Returns coordinate terms for 1st sense of word/pos, or null if not found
X is a coordinate term of Y if there exists a term Z which is the hypernym of both X and Y.
Examples: blackbird and robin are coordinate terms (since they are both a kind of thrush) gun and bow are coordinate terms (since they are both weapons) fork and spoon are coordinate terms (since they are both cutlery, or eating utensils) hat and helmet are coordinate terms (since they are both a kind of headgear or headdress) Example: arm -> [hind-limb, forelimb, flipper, leg, crus, thigh, arm...]
Holds btwn nouns/nouns and verbs/verbs
 java.lang.String[] getDerivedTerms(int id)
          Returns derived terms for the id, or null if not found
Holds for adverbs
Example: happily -> [jubilant, blithe, gay, mirthful, merry, happy]
 java.lang.String[] getDerivedTerms(java.lang.String query, java.lang.String pos)
          Returns derived terms for 1st sense of word/pos or null if not found
Holds for adverbs
Example: happily -> [jubilant, blithe, gay, mirthful, merry, happy]
 java.lang.String getDescription(int senseId)
          Returns description for word with unique senseId, or null if not found
 java.lang.String getDescription(java.lang.String word, java.lang.String pos)
          Returns description for word with pos or null if not found
 float getDistance(java.lang.String lemma1, java.lang.String lemma2, java.lang.String pos)
          Returns the min distance between any two senses for the 2 words in the wordnet tree (result normalized to 0-1) with specified pos, or 1.0 if either is not found
 java.lang.String[] getEndsWith(java.lang.String word, java.lang.String posStr)
          Returns up to maxResults of the specified pos ending with the given word.
 java.lang.String[] getEndsWith(java.lang.String word, java.lang.String posStr, int maxResults)
          Returns up to maxResults of the specified pos ending with the given word.
 java.lang.String[] getExamples(java.lang.CharSequence word, java.lang.CharSequence pos)
          Returns all examples for 1st sense of word with pos, or null if not found
 java.lang.String[] getExamples(int senseId)
          Returns examples for word with unique senseId, or null if not found
 java.lang.String getGloss(int senseId)
          Returns full gloss for word with unique senseId, or null if not found
 java.lang.String getGloss(java.lang.String word, java.lang.String pos)
          Returns full gloss for !st sense of 'word' with 'pos' or null if not found
 java.lang.String[] getHolonyms(int id)
          Returns part-to-whole relationships for 1st sense of word/pos, or none if not found
X is a meronym of Y if Y has X as a part.
X is a holonym of Y if X has Y as a part.
 java.lang.String[] getHolonyms(java.lang.String query, java.lang.String pos)
          Returns part-to-whole relationships for 1st sense of word/pos, or none if not found
X is a meronym of Y if Y has X as a part.
X is a holonym of Y if X has Y as a part.
 java.lang.String[] getHypernyms(int id)
          Returns Hypernym String[] for id, or null if not found
 java.lang.String[] getHypernyms(java.lang.String word, java.lang.String posStr)
          Returns Hypernym String[] for all senses of word with pos or null if not found
 java.lang.String[] getHypernymTree(int id)
          Returns an ordered String[] of hypernym-synsets (each a semi-colon delimited String) up to the root of Wordnet for the id, or null if not found
 java.lang.String[] getHyponyms(int id)
          Returns Hyponym String[] for id, or null if not found
 java.lang.String[] getHyponyms(java.lang.String word, java.lang.String posStr)
          Returns Hyponym String[] for 1st sense of word with pos or null if not found
 java.lang.String[] getHyponymTree(int id)
          Returns an unordered String[] of hyponym-synsets (each a colon-delimited String) representing all paths to leaves in the ontology (the full hyponym tree), or null if not found
 java.lang.String[] getMeronyms(int id)
          Returns array of whole-to-part relationships for id, or null if not found
X is a meronym of Y if Y has X as a part.
X is a holonym of Y if X has Y as a part.
 java.lang.String[] getMeronyms(java.lang.String query, java.lang.String pos)
          Returns array of whole-to-part relationships for 1st sense of word/pos, or null if not found
X is a meronym of Y if Y has X as a part.
X is a holonym of Y if X has Y as a part.
 java.lang.String[] getNominalizations(int id)
          Returns nominalized terms for id, or null if not found
Refers to the use of a verb or an adjective as a noun.
 java.lang.String[] getNominalizations(java.lang.String query, java.lang.String pos)
          Returns nominalized terms for 1st sense of word/pos or null if not found
Refers to the use of a verb or an adjective as a noun.
 java.lang.String getPos(int id)
           
 java.lang.String[] getPos(java.lang.String word)
          Returns an array of all parts-of-speech ordered according to their polysemy count, returning the pos with the most different senses in the first position, etc.
 java.lang.String getRandomExample(java.lang.CharSequence pos)
          Returns a random example from a random word w' pos
 java.lang.String[] getRandomExamples(java.lang.CharSequence pos, int numExamples)
          Returns numExamples random examples from random words w' pos
 java.lang.String getRandomWord(java.lang.CharSequence pos)
          Returns a random stem with pos and a max length of this.maxCharsPerWord.
 java.lang.String getRandomWord(java.lang.CharSequence pos, boolean stemsOnly, int maxChars)
          Returns a random word with pos and a maximum of maxChars.
 java.lang.String[] getRandomWords(java.lang.CharSequence pos, int count)
          Returns count random words w' pos
 java.lang.String[] getRegexMatch(java.lang.String pattern, java.lang.String posStr)
          Returns up to maxResults of the specified pos Example: 'table' returns 'turntable' & 'uncomfortable'
 java.lang.String[] getRegexMatch(java.lang.String pattern, java.lang.String posStr, int maxResults)
          Returns up to maxResults of the specified pos matching the the given regular expression pattern.
 int getSenseCount(java.lang.String word, java.lang.String pos)
          Return the # of senses (polysemy) for a given word/pos.
 int[] getSenseIds(java.lang.String word, java.lang.String posStr)
          Returns String[] of unique ids, one for each 'sense' of word with pos, or null if none are found.
 java.lang.String[] getSimilar(int id)
          Returns similar-to list for id, or null if not found
Holds for adjectives
Example:
happy(a) -> [blessed, blissful, bright, golden, halcyon, prosperous...]
 java.lang.String[] getSimilar(java.lang.String query, java.lang.String pos)
          Returns similar-to list for first sense of word/pos or null if not found
Holds for adjectives
Example:
happy(a) -> [blessed, blissful, bright, golden, halcyon, prosperous...]
 java.lang.String[] getSoundsLike(java.lang.String pattern, java.lang.String posStr)
          Returns up to maxResults of the specified pos that match the soundex code of the given word.
 java.lang.String[] getSoundsLike(java.lang.String pattern, java.lang.String posStr, int maxResults)
          Returns up to maxResults of the specified pos that match the soundex code of the given word.
 java.lang.String[] getStartsWith(java.lang.String word, java.lang.String posStr)
          Returns up to maxResults of the specified pos starting with the given word.
 java.lang.String[] getStartsWith(java.lang.String word, java.lang.String posStr, int maxResults)
          Returns up to maxResults of the specified pos starting with the given word.
 java.lang.String[] getStems(java.lang.String query, java.lang.CharSequence pos)
          Returns an array of all stems, or null if not found
 java.lang.String[] getSynonyms(java.lang.String word, java.lang.String posStr)
          Returns an unordered String[] containing the synset, hyponyms, similars, alsoSees, and coordinate terms (checking each in order) for all senses of word with pos, or null if not found
 java.lang.String[] getSynonyms(java.lang.String word, java.lang.String posStr, int maxResults)
          Returns an unordered String[] containing the synset, hyponyms, similars, alsoSees, and coordinate terms (checking each in order) for all senses of word with pos, or null if not found
 java.lang.String[] getSynset(int id)
          Returns String[] of Synsets for unique id id or null if not found.
 java.lang.String[] getSynset(java.lang.String word, java.lang.String pos)
          Returns String[] of words in synset for first sense of word with pos, or null if not found.
 java.lang.String[] getSynset(java.lang.String word, java.lang.String pos, boolean includeOriginal)
          Returns String[] of words in synset for first sense of word with pos, or null if not found.
 java.lang.String[] getVerbGroup(int id)
          Returns verb group for id, or null if not found
Example: live -> [dwell, inhabit]
Holds for verbs
 java.lang.String[] getVerbGroup(java.lang.String query, java.lang.String pos)
          Returns verb group for 1st sense of verb or null if not found
Example: live -> [dwell, inhabit]
Holds for verbs
 java.lang.String[] getWildcardMatch(java.lang.String pattern, java.lang.String posStr)
          Returns up to maxResults of the specified pos matching a wildcard pattern,
with '*' representing any number of characters,
and '?' equals any single character..
 java.lang.String[] getWildcardMatch(java.lang.String pattern, java.lang.String posStr, int maxResults)
          Returns up to maxResults of the specified pos matching a wildcard pattern,
with * '*' equals any number of characters,
and '?' equals any single character.
 void ignoreCompoundWords(boolean ignoreCompoundWords)
           
 void ignoreUpperCaseWords(boolean ignoreUpperCaseWords)
           
 boolean isAdjective(java.lang.String word)
           
 boolean isAdverb(java.lang.String word)
           
 boolean isIgnoringCompoundWords()
           
 boolean isIgnoringUpperCaseWords()
           
 boolean isNoun(java.lang.String word)
           
 boolean isStem(java.lang.String word, java.lang.CharSequence pos)
          Returns true if 'word' exists with 'pos' and is equal (via String.equals()) to any of its stem forms, else false;
 boolean isVerb(java.lang.String word)
           
 java.lang.String[] orFilter(int[] filterFlag, java.lang.String[] word, java.lang.String pos)
           
 java.lang.String[] orFilter(int[] filterFlags, java.lang.String[] words, java.lang.String pos, int maxResults)
          Return up to maxResults instances of specified matching ANY of the filters specified with filterFlags.
 void printHypernymTree(int senseId)
          Prints the full hypernym tree to System.out (primarily for debugging).
 void printHyponymTree(int senseId)
          Prints the full hyponym tree to System.out (primarily for debugging).
 void removeNonExistent(java.util.Collection words)
          Check each word in 'words' and removes those that don't exist in the ontology.
 void setWordnetHome(java.lang.String wordnetHome)
           
 

Method Detail

getAnagrams

java.lang.String[] getAnagrams(java.lang.String word,
                               java.lang.String posStr,
                               int maxResults)
Returns up to maxResults full anagram matches for the specified word and pos

Example: 'table' returns 'bleat' (but not 'tale').


getAnagrams

java.lang.String[] getAnagrams(java.lang.String word,
                               java.lang.String posStr)
Returns all full anagram matches for the specified word and pos

Example: 'table' returns 'bleat' (but not 'tale').

Parameters:
word -
posStr -

getContains

java.lang.String[] getContains(java.lang.String word,
                               java.lang.String posStr,
                               int maxResults)
Returns up to maxResults of the specified pos where each contains the given word

Example: 'table' returns 'bleat' (but not 'tale').

Parameters:
word -
posStr -
maxResults -

getContains

java.lang.String[] getContains(java.lang.String word,
                               java.lang.String posStr)
Returns all 'contains' matches for the specified word and pos

Example: 'table' returns 'bleat' (but not 'tale').

Parameters:
word -
posStr -

getEndsWith

java.lang.String[] getEndsWith(java.lang.String word,
                               java.lang.String posStr,
                               int maxResults)
Returns up to maxResults of the specified pos ending with the given word.

Example: 'table' returns 'turntable' & 'uncomfortable'

Parameters:
word -
posStr -
maxResults -

getEndsWith

java.lang.String[] getEndsWith(java.lang.String word,
                               java.lang.String posStr)
Returns up to maxResults of the specified pos ending with the given word.

Example: 'table' returns 'turntable' & 'uncomfortable'

Parameters:
word -
posStr -

getStartsWith

java.lang.String[] getStartsWith(java.lang.String word,
                                 java.lang.String posStr,
                                 int maxResults)
Returns up to maxResults of the specified pos starting with the given word.

Example: 'turn' returns 'turntable'

Parameters:
word -
posStr -
maxResults -

getStartsWith

java.lang.String[] getStartsWith(java.lang.String word,
                                 java.lang.String posStr)
Returns up to maxResults of the specified pos starting with the given word.

Example: 'turn' returns 'turntable'

Parameters:
word -
posStr -

getRegexMatch

java.lang.String[] getRegexMatch(java.lang.String pattern,
                                 java.lang.String posStr,
                                 int maxResults)
Returns up to maxResults of the specified pos matching the the given regular expression pattern.

Parameters:
pattern -
posStr -
maxResults -
See Also:
Pattern

getRegexMatch

java.lang.String[] getRegexMatch(java.lang.String pattern,
                                 java.lang.String posStr)
Returns up to maxResults of the specified pos Example: 'table' returns 'turntable' & 'uncomfortable'

Parameters:
pattern -
posStr -
See Also:
Pattern

getSoundsLike

java.lang.String[] getSoundsLike(java.lang.String pattern,
                                 java.lang.String posStr,
                                 int maxResults)
Returns up to maxResults of the specified pos that match the soundex code of the given word.

Parameters:
pattern -
posStr -
maxResults -

getSoundsLike

java.lang.String[] getSoundsLike(java.lang.String pattern,
                                 java.lang.String posStr)
Returns up to maxResults of the specified pos that match the soundex code of the given word.

Parameters:
pattern -
posStr -

getWildcardMatch

java.lang.String[] getWildcardMatch(java.lang.String pattern,
                                    java.lang.String posStr,
                                    int maxResults)
Returns up to maxResults of the specified pos matching a wildcard pattern,
with * '*' equals any number of characters,
and '?' equals any single character.

Example: 't?le' returns (tale,tile,tole)
Example: 't*le' returns (tatumble, turtle, tussle, etc.)
Example: 't?le*' returns (telex, tile,tilefish,tile,talent, tiles, etc.)

Parameters:
pattern -
posStr -
maxResults -

getWildcardMatch

java.lang.String[] getWildcardMatch(java.lang.String pattern,
                                    java.lang.String posStr)
Returns up to maxResults of the specified pos matching a wildcard pattern,
with '*' representing any number of characters,
and '?' equals any single character..

Example: 't?le' returns (tale,tile,tole)
Example: 't*le' returns (tatumble, turtle, tussle, etc.)
Example: 't?le*' returns (telex, tile,tilefish,tile,talent, tiles, etc.)

Parameters:
pattern -
posStr -

filter

java.lang.String[] filter(int filterFlag,
                          java.lang.String word,
                          java.lang.String pos,
                          int maxResults)
Return up to maxResults instances of specified posStr matching the filter specified with filterFlag

Filter types include:

        RiWordnet.EXACT_MATCH
        RiWordnet.ENDS_WITH
        RiWordnet.STARTS_WITH
        RiWordnet.ANAGRAMS 
        RiWordnet.CONTAINS_ALL
        RiWordnet.CONTAINS_SOME  
        RiWordnet.CONTAINS
        RiWordnet.SIMILAR_TO
        RiWordnet.SOUNDS_LIKE
        RiWordnet.WILDCARD_MATCH
        RiWordnet.REGEX_MATCH                
 

Parameters:
filterFlag -
word -
pos -
maxResults -
Invisible:

filter

java.lang.String[] filter(int filterFlag,
                          java.lang.String word,
                          java.lang.String pos)
Parameters:
word -
pos -
filterFlag -
Invisible:
Return all instances of specified posStr matching the filter specified with filterFlag.

Filter types include:

        RiWordnet.EXACT_MATCH
        RiWordnet.ENDS_WITH
        RiWordnet.STARTS_WITH
        RiWordnet.ANAGRAMS 
        RiWordnet.CONTAINS_ALL
        RiWordnet.CONTAINS_SOME  
        RiWordnet.CONTAINS
        RiWordnet.SIMILAR_TO
        RiWordnet.SOUNDS_LIKE
        RiWordnet.WILDCARD_MATCH
        RiWordnet.REGEX_MATCH                
 
ss

orFilter

java.lang.String[] orFilter(int[] filterFlags,
                            java.lang.String[] words,
                            java.lang.String pos,
                            int maxResults)
Return up to maxResults instances of specified matching ANY of the filters specified with filterFlags.

Filter types include:

        RiWordnet.EXACT_MATCH
        RiWordnet.ENDS_WITH
        RiWordnet.STARTS_WITH
        RiWordnet.ANAGRAMS 
        RiWordnet.CONTAINS_ALL
        RiWordnet.CONTAINS_SOME  
        RiWordnet.CONTAINS
        RiWordnet.SIMILAR_TO
        RiWordnet.SOUNDS_LIKE
        RiWordnet.WILDCARD_MATCH
        RiWordnet.REGEX_MATCH                
 

Parameters:
filterFlags -
words -
pos -
maxResults -
Invisible:

orFilter

java.lang.String[] orFilter(int[] filterFlag,
                            java.lang.String[] word,
                            java.lang.String pos)
Parameters:
word -
pos -
filterFlag -
Invisible:
Return all instances of specified posStr matching ANY of the filters specified with filterFlags.

Filter types include:

        RiWordnet.EXACT_MATCH
        RiWordnet.ENDS_WITH
        RiWordnet.STARTS_WITH
        RiWordnet.ANAGRAMS 
        RiWordnet.CONTAINS_ALL
        RiWordnet.CONTAINS_SOME  
        RiWordnet.CONTAINS
        RiWordnet.SIMILAR_TO
        RiWordnet.SOUNDS_LIKE
        RiWordnet.WILDCARD_MATCH
        RiWordnet.REGEX_MATCH                
 

setWordnetHome

void setWordnetHome(java.lang.String wordnetHome)
Invisible:

getSenseIds

int[] getSenseIds(java.lang.String word,
                  java.lang.String posStr)
Returns String[] of unique ids, one for each 'sense' of word with pos, or null if none are found.

A Wordnet 'sense' refers to a specific Wordnet meaning and maps 1-1 to the concept of synsets. Each 'sense' of a word exists in a different synset.

For more info, see: http://wordnet.princeton.edu/man/wngloss.7WN.html


getGloss

java.lang.String getGloss(java.lang.String word,
                          java.lang.String pos)
Returns full gloss for !st sense of 'word' with 'pos' or null if not found


getAllGlosses

java.lang.String[] getAllGlosses(java.lang.String word,
                                 java.lang.String pos)
Returns glosses for all senses of 'word' with 'pos', or null if not found


getGloss

java.lang.String getGloss(int senseId)
Returns full gloss for word with unique senseId, or null if not found


getDescription

java.lang.String getDescription(int senseId)
Returns description for word with unique senseId, or null if not found


getDescription

java.lang.String getDescription(java.lang.String word,
                                java.lang.String pos)
Returns description for word with pos or null if not found


getExamples

java.lang.String[] getExamples(java.lang.CharSequence word,
                               java.lang.CharSequence pos)
Returns all examples for 1st sense of word with pos, or null if not found


getAnyExample

java.lang.String getAnyExample(java.lang.CharSequence word,
                               java.lang.CharSequence pos)
Return a random example from the set of examples from all senses of word with pos, assuming they contain word, or else null if not found


getExamples

java.lang.String[] getExamples(int senseId)
Returns examples for word with unique senseId, or null if not found


getAllExamples

java.lang.String[] getAllExamples(java.lang.CharSequence word,
                                  java.lang.CharSequence pos)
Returns examples for all senses of word with pos if they contain the word, else null if not found


getAllSynonyms

java.lang.String[] getAllSynonyms(int senseId,
                                  int maxResults)
Returns an unordered String[] containing the synset, hyponyms, similars, alsoSees, and coordinate terms (checking each in order), or null if not found.


getAllSynonyms

java.lang.String[] getAllSynonyms(int id)

getSynonyms

java.lang.String[] getSynonyms(java.lang.String word,
                               java.lang.String posStr,
                               int maxResults)
Returns an unordered String[] containing the synset, hyponyms, similars, alsoSees, and coordinate terms (checking each in order) for all senses of word with pos, or null if not found


getSynonyms

java.lang.String[] getSynonyms(java.lang.String word,
                               java.lang.String posStr)
Returns an unordered String[] containing the synset, hyponyms, similars, alsoSees, and coordinate terms (checking each in order) for all senses of word with pos, or null if not found


getAllSynonyms

java.lang.String[] getAllSynonyms(java.lang.String word,
                                  java.lang.String posStr,
                                  int maxResults)
Returns an unordered String[] containing the synset, hyponyms, similars, alsoSees, and coordinate terms (checking each in order) for all senses of word with pos, or null if not found


getAllSynonyms

java.lang.String[] getAllSynonyms(java.lang.String word,
                                  java.lang.String posStr)

getCommonParents

java.lang.String[] getCommonParents(java.lang.String word1,
                                    java.lang.String word2,
                                    java.lang.String pos)
Returns String[] of Common Parents for 1st senses of words with specified pos' or null if not found


getSynset

java.lang.String[] getSynset(java.lang.String word,
                             java.lang.String pos)
Returns String[] of words in synset for first sense of word with pos, or null if not found.

Note: original word is excluded by default.

See Also:
getSynset(String, String, boolean)

getSynset

java.lang.String[] getSynset(java.lang.String word,
                             java.lang.String pos,
                             boolean includeOriginal)
Returns String[] of words in synset for first sense of word with pos, or null if not found.


getSynset

java.lang.String[] getSynset(int id)
Returns String[] of Synsets for unique id id or null if not found.


getAllSynsets

java.lang.String[] getAllSynsets(java.lang.String word,
                                 java.lang.String posStr)
Returns String[] of words in each synset for all senses of word with pos, or null if not found


getSenseCount

int getSenseCount(java.lang.String word,
                  java.lang.String pos)
Return the # of senses (polysemy) for a given word/pos. A 'sense' refers to a specific Wordnet meaning and maps 1-1 to the concept of synsets. Each 'sense' of a word exists in a different synset.

For more info, see http://wordnet.princeton.edu/man/wngloss.7WN.html.

Returns:
# of senses or -1 if not found

getAntonyms

java.lang.String[] getAntonyms(java.lang.String word,
                               java.lang.String pos)
Returns String[] of Antonyms for the 1st sense of word with pos or null if not found
Holds for adjectives only (?)


getAntonyms

java.lang.String[] getAntonyms(int id)
Returns String[] of Antonyms for the specified id, or null if not found
Holds for adjectives only (?)


getAllAntonyms

java.lang.String[] getAllAntonyms(java.lang.String word,
                                  java.lang.String pos)
Returns String[] of Antonyms for the 1st sense of word with pos or null if not found
Holds for adjectives only (?)


getHypernyms

java.lang.String[] getHypernyms(java.lang.String word,
                                java.lang.String posStr)
Returns Hypernym String[] for all senses of word with pos or null if not found

X is a hyponym of Y if there exists an is-a relationship between X and Y.
That is, if X is a subtype of Y.
Or, for xample, if X is a species of the genus Y.
X is a hypernym of Y is Y is a hyponym of X.
Holds between: nouns and nouns & verbs and verbs
Examples:


getHypernyms

java.lang.String[] getHypernyms(int id)
Returns Hypernym String[] for id, or null if not found

X is a hyponym of Y if there exists an is-a relationship between X and Y.
That is, if X is a subtype of Y.
Or, for example, if X is a species of the genus Y.
X is a hypernym of Y is Y is a hyponym of X.
Holds between: nouns and nouns & verbs and verbs
Examples:


getAllHypernyms

java.lang.String[] getAllHypernyms(java.lang.String word,
                                   java.lang.String posStr)
Returns an ordered String[] of hypernym-synsets (each a semi-colon delimited String) up to the root of Wordnet for the 1st sense of the word, or null if not foundsssssss


getHypernymTree

java.lang.String[] getHypernymTree(int id)
Returns an ordered String[] of hypernym-synsets (each a semi-colon delimited String) up to the root of Wordnet for the id, or null if not found


getHyponyms

java.lang.String[] getHyponyms(java.lang.String word,
                               java.lang.String posStr)
Returns Hyponym String[] for 1st sense of word with pos or null if not found

X is a hyponym of Y if there exists an is-a relationship between X and Y.
That is, if X is a subtype of Y.
Or, for xample, if X is a species of the genus Y.
X is a hypernym of Y is Y is a hyponym of X.
Holds between: nouns and nouns & verbs and verbs
Examples:


getHyponyms

java.lang.String[] getHyponyms(int id)
Returns Hyponym String[] for id, or null if not found

X is a hyponym of Y if there exists an is-a relationship between X and Y.
That is, if X is a subtype of Y.
Or, for xample, if X is a species of the genus Y.
X is a hypernym of Y is Y is a hyponym of X.
Holds between: nouns and nouns & verbs and verbs
Examples:


getAllHyponyms

java.lang.String[] getAllHyponyms(java.lang.String word,
                                  java.lang.String posStr)
Returns an unordered String[] of hyponym-synsets (each a colon-delimited String), or null if not found


getHyponymTree

java.lang.String[] getHyponymTree(int id)
Returns an unordered String[] of hyponym-synsets (each a colon-delimited String) representing all paths to leaves in the ontology (the full hyponym tree), or null if not found


isAdjective

boolean isAdjective(java.lang.String word)

isAdverb

boolean isAdverb(java.lang.String word)

isVerb

boolean isVerb(java.lang.String word)

isNoun

boolean isNoun(java.lang.String word)

getStems

java.lang.String[] getStems(java.lang.String query,
                            java.lang.CharSequence pos)
Returns an array of all stems, or null if not found

Parameters:
query -
pos -

isStem

boolean isStem(java.lang.String word,
               java.lang.CharSequence pos)
Returns true if 'word' exists with 'pos' and is equal (via String.equals()) to any of its stem forms, else false;


exists

boolean exists(java.lang.String word)
Checks the existence of a 'word' in the ontology

Parameters:
word -

removeNonExistent

void removeNonExistent(java.util.Collection words)
Check each word in 'words' and removes those that don't exist in the ontology.

Note: destructive operation

Parameters:
words -
Invisible:

getPos

java.lang.String[] getPos(java.lang.String word)
Returns an array of all parts-of-speech ordered according to their polysemy count, returning the pos with the most different senses in the first position, etc.

Returns:
String[], one element for each part of speech ("a" = adjective, "n" = noun, "r" = adverb, "v" = verb), or null if not found.

getPos

java.lang.String getPos(int id)
Returns:
String from ("a" = adjective, "n" = noun, "r" = adverb, "v" = verb), or null if not found.

getBestPos

java.lang.String getBestPos(java.lang.String word)
Returns most-common pos according to polysemy count, returning the pos with the most different senses.

Returns:
single-char String for the most common part of speech ("a" = adjective, "n" = noun, "r" = adverb, "v" = verb), or null if not found.

getRandomExample

java.lang.String getRandomExample(java.lang.CharSequence pos)
Returns a random example from a random word w' pos

Returns:
random example

getRandomExamples

java.lang.String[] getRandomExamples(java.lang.CharSequence pos,
                                     int numExamples)
Returns numExamples random examples from random words w' pos

Returns:
random examples

getRandomWords

java.lang.String[] getRandomWords(java.lang.CharSequence pos,
                                  int count)
Returns count random words w' pos

Returns:
String[] of random words

getRandomWord

java.lang.String getRandomWord(java.lang.CharSequence pos)
Returns a random stem with pos and a max length of this.maxCharsPerWord.

Returns:
random word

getRandomWord

java.lang.String getRandomWord(java.lang.CharSequence pos,
                               boolean stemsOnly,
                               int maxChars)
Returns a random word with pos and a maximum of maxChars.

Returns:
a random word or null if none is found

printHyponymTree

void printHyponymTree(int senseId)
Prints the full hyponym tree to System.out (primarily for debugging).

Parameters:
senseId -

printHypernymTree

void printHypernymTree(int senseId)
Prints the full hypernym tree to System.out (primarily for debugging).

Parameters:
senseId -

getDistance

float getDistance(java.lang.String lemma1,
                  java.lang.String lemma2,
                  java.lang.String pos)
Returns the min distance between any two senses for the 2 words in the wordnet tree (result normalized to 0-1) with specified pos, or 1.0 if either is not found


getMeronyms

java.lang.String[] getMeronyms(java.lang.String query,
                               java.lang.String pos)
Returns array of whole-to-part relationships for 1st sense of word/pos, or null if not found
X is a meronym of Y if Y has X as a part.
X is a holonym of Y if X has Y as a part. That is, if Y is a meronym of X.
Holds between: Nouns and nouns
Returns part,member, and substance meronyms
Example: arm -> [wrist, carpus, wrist-joint, radiocarpal-joint...]

Parameters:
query -
pos -

getMeronyms

java.lang.String[] getMeronyms(int id)
Returns array of whole-to-part relationships for id, or null if not found
X is a meronym of Y if Y has X as a part.
X is a holonym of Y if X has Y as a part. That is, if Y is a meronym of X.
Holds between: Nouns and nouns
Returns part,member, and substance meronyms
Example: arm -> [wrist, carpus, wrist-joint, radiocarpal-joint...]


getAllMeronyms

java.lang.String[] getAllMeronyms(java.lang.String query,
                                  java.lang.String pos)
Returns array of whole-to-part relationships for all senses of word/pos, or null if not found
X is a meronym of Y if Y has X as a part.
X is a holonym of Y if X has Y as a part. That is, if Y is a meronym of X.
Holds between: Nouns and nouns
Returns part,member, and substance meronyms
Example: arm -> [wrist, carpus, wrist-joint, radiocarpal-joint...]

Parameters:
query -
pos -

getHolonyms

java.lang.String[] getHolonyms(java.lang.String query,
                               java.lang.String pos)
Returns part-to-whole relationships for 1st sense of word/pos, or none if not found
X is a meronym of Y if Y has X as a part.
X is a holonym of Y if X has Y as a part. That is, if Y is a meronym of X.
Holds between: nouns and nouns
Returns part, member, and substance holonyms
Example: arm -> [body, physical-structure, man, human...]

Parameters:
query -
pos -

getHolonyms

java.lang.String[] getHolonyms(int id)
Returns part-to-whole relationships for 1st sense of word/pos, or none if not found
X is a meronym of Y if Y has X as a part.
X is a holonym of Y if X has Y as a part. That is, if Y is a meronym of X.
Holds between: nouns and nouns
Returns part, member, and substance holonyms
Example: arm -> [body, physical-structure, man, human...]


getAllHolonyms

java.lang.String[] getAllHolonyms(java.lang.String query,
                                  java.lang.String pos)
Returns part-to-whole relationships for all sense of word/pos, or none if not found
X is a meronym of Y if Y has X as a part.
X is a holonym of Y if X has Y as a part. That is, if Y is a meronym of X.
Holds between: nouns and nouns
Returns part, member, and substance holonyms
Example: arm -> [body, physical-structure, man, human...]

Parameters:
query -
pos -

getCoordinates

java.lang.String[] getCoordinates(java.lang.String query,
                                  java.lang.String pos)
Returns coordinate terms for 1st sense of word/pos, or null if not found
X is a coordinate term of Y if there exists a term Z which is the hypernym of both X and Y.
Examples: Example: arm -> [hind-limb, forelimb, flipper, leg, crus, thigh, arm...]
Holds btwn nouns/nouns and verbs/verbs

Parameters:
query -
pos -

getCoordinates

java.lang.String[] getCoordinates(int id)
Returns String[] of Coordinates for the specified id, or null if not found


getAllCoordinates

java.lang.String[] getAllCoordinates(java.lang.String query,
                                     java.lang.String pos)
Returns coordinate terms for all sense of word/pos, or null if not found
X is a coordinate term of Y if there exists a term Z which is the hypernym of both X and Y.
Examples: Example: arm -> [hind-limb, forelimb, flipper, leg, crus, thigh, arm...]
Holds btwn nouns/nouns and verbs/verbs

Parameters:
query -
pos -

getVerbGroup

java.lang.String[] getVerbGroup(java.lang.String query,
                                java.lang.String pos)
Returns verb group for 1st sense of verb or null if not found
Example: live -> [dwell, inhabit]
Holds for verbs

Parameters:
query -
pos -

getVerbGroup

java.lang.String[] getVerbGroup(int id)
Returns verb group for id, or null if not found
Example: live -> [dwell, inhabit]
Holds for verbs


getAllVerbGroups

java.lang.String[] getAllVerbGroups(java.lang.String query,
                                    java.lang.String pos)
Returns verb group for all senses of verb or null if not found
Example: live -> [dwell, inhabit]
Holds for verbs

Parameters:
query -
pos -

getDerivedTerms

java.lang.String[] getDerivedTerms(java.lang.String query,
                                   java.lang.String pos)
Returns derived terms for 1st sense of word/pos or null if not found
Holds for adverbs
Example: happily -> [jubilant, blithe, gay, mirthful, merry, happy]

Parameters:
query -
pos -

getDerivedTerms

java.lang.String[] getDerivedTerms(int id)
Returns derived terms for the id, or null if not found
Holds for adverbs
Example: happily -> [jubilant, blithe, gay, mirthful, merry, happy]


getAllDerivedTerms

java.lang.String[] getAllDerivedTerms(java.lang.String query,
                                      java.lang.String pos)
Returns derived terms forall senses of word/pos or null if not found
Holds for adverbs
Example: happily -> [jubilant, blithe, gay, mirthful, merry, happy]

Parameters:
query -
pos -

getAlsoSees

java.lang.String[] getAlsoSees(java.lang.String query,
                               java.lang.String pos)
Returns also-see terms for 1st sense of word/pos or null if not found
Holds for nouns (?) & adjectives
Example: happy -> [cheerful, elated, euphoric, felicitous, joyful, joyous...]

Parameters:
query -
pos -

getAlsoSees

java.lang.String[] getAlsoSees(int senseId)
Returns also-see terms for seseId or null if not found
Holds for nouns (?) & adjectives
Example: happy -> [cheerful, elated, euphoric, felicitous, joyful, joyous...]

Parameters:
senseId -

getAllAlsoSees

java.lang.String[] getAllAlsoSees(java.lang.String query,
                                  java.lang.String pos)
Returns also-see terms for all senses ofword/pos or null if not found
Holds for nouns (?) & adjectives
Example: happy -> [cheerful, elated, euphoric, felicitous, joyful, joyous...]

Parameters:
query -
pos -

getNominalizations

java.lang.String[] getNominalizations(java.lang.String query,
                                      java.lang.String pos)
Returns nominalized terms for 1st sense of word/pos or null if not found
Refers to the use of a verb or an adjective as a noun. Holds for nouns, verbs & adjecstives(?)
Example: happiness(n) -> [happy, unhappy]
happy(a) -> [happiness, felicity]

Parameters:
query -
pos -

getNominalizations

java.lang.String[] getNominalizations(int id)
Returns nominalized terms for id, or null if not found
Refers to the use of a verb or an adjective as a noun. Holds for nouns, verbs & adjecstives(?)
Example: happiness(n) -> [happy, unhappy]
happy(a) -> [happiness, felicity]


getAllNominalizations

java.lang.String[] getAllNominalizations(java.lang.String query,
                                         java.lang.String pos)
Returns nominalized terms for all sense of word/pos or null if not found
Refers to the use of a verb or an adjective as a noun. Holds for nouns, verbs & adjecstives(?)
Example: happiness(n) -> [happy, unhappy]
happy(a) -> [happiness, felicity]

Parameters:
query -
pos -

getSimilar

java.lang.String[] getSimilar(java.lang.String query,
                              java.lang.String pos)
Returns similar-to list for first sense of word/pos or null if not found
Holds for adjectives
Example:
happy(a) -> [blessed, blissful, bright, golden, halcyon, prosperous...]

Parameters:
query -
pos -

getSimilar

java.lang.String[] getSimilar(int id)
Returns similar-to list for id, or null if not found
Holds for adjectives
Example:
happy(a) -> [blessed, blissful, bright, golden, halcyon, prosperous...]


getAllSimilar

java.lang.String[] getAllSimilar(java.lang.String query,
                                 java.lang.String pos)
Returns similar-to list for all sense of word/pos or null if not found
Holds for adjectives
Example:
happy(a) -> [blessed, blissful, bright, golden, halcyon, prosperous...]

Parameters:
query -
pos -

isIgnoringCompoundWords

boolean isIgnoringCompoundWords()

ignoreCompoundWords

void ignoreCompoundWords(boolean ignoreCompoundWords)

isIgnoringUpperCaseWords

boolean isIgnoringUpperCaseWords()

ignoreUpperCaseWords

void ignoreUpperCaseWords(boolean ignoreUpperCaseWords)