rita.support.remote
Class RiWordnetSupport

java.lang.Object
  extended by rita.RiObject
      extended by rita.support.remote.RiWordnetSupport
All Implemented Interfaces:
processing.core.PConstants, RiWordnetIF, RiConstants

public class RiWordnetSupport
extends RiObject
implements RiWordnetIF

Dynamically loads the RiTa.WordNet library (if it is present) and delegates calls to it. Generally used for accessing Wordnet via the RiTaServer. Note: for most cases, is simpler to just use the rita.wordnet.RiTaWordnet that comes with RiTa.WordNet pkg.

Invisible:

Field Summary
static java.lang.String RITA_WORDNET_CLASS
           
static java.lang.String RITA_WORDNET_URL
           
 
Fields inherited from interface rita.support.RiConstants
BEHAVIOR_COMPLETED, BOUNDING_BOX_ALPHA, BRILL_POS_TAGGER, EASE_IN, EASE_IN_CUBIC, EASE_IN_EXPO, EASE_IN_OUT, EASE_IN_OUT_CUBIC, EASE_IN_OUT_EXPO, EASE_IN_OUT_QUARTIC, EASE_IN_OUT_SINE, EASE_IN_QUARTIC, EASE_IN_SINE, EASE_OUT, EASE_OUT_CUBIC, EASE_OUT_EXPO, EASE_OUT_QUARTIC, EASE_OUT_SINE, ESS, FADE_COLOR, FADE_IN, FADE_OUT, FADE_TO_TEXT, FIRST_PERSON, FUTURE_TENSE, ID, LERP, LINEAR, MAXENT_POS_TAGGER, MINIM, MOVE, MUTABLE, PAST_TENSE, PHONEME_BOUNDARY, PHONEMES, PLING_STEMMER, PLURAL, PORTER_STEMMER, POS, PRESENT_TENSE, SCALE_TO, SECOND_PERSON, SENTENCE_BOUNDARY, SINGULAR, SONIA, SPEECH_COMPLETED, STRESSES, SYLLABLE_BOUNDARY, SYLLABLES, TEXT, TEXT_ENTERED, THIRD_PERSON, TIMER, TIMER_COMPLETED, TIMER_TICK, TOKENS, UNKNOWN, WORD_BOUNDARY
 
Fields inherited from interface processing.core.PConstants
A, AB, ADD, AG, ALPHA, ALPHA_MASK, ALT, AMBIENT, AR, ARC, ARGB, ARROW, B, BACKSPACE, BASELINE, BEEN_LIT, BEVEL, BLEND, BLUE_MASK, BLUR, BOTTOM, BOX, BURN, CENTER, CENTER_DIAMETER, CENTER_RADIUS, CHATTER, CLOSE, CMYK, CODED, COMPLAINT, CONTROL, CORNER, CORNERS, CROSS, CUSTOM, DA, DARKEST, DB, DEG_TO_RAD, DELETE, DG, DIAMETER, DIFFERENCE, DILATE, DIRECTIONAL, DISABLE_ACCURATE_TEXTURES, DISABLE_DEPTH_SORT, DISABLE_DEPTH_TEST, DISABLE_OPENGL_2X_SMOOTH, DISABLE_OPENGL_ERROR_REPORT, DODGE, DOWN, DR, DXF, EB, EDGE, EG, ELLIPSE, ENABLE_ACCURATE_TEXTURES, ENABLE_DEPTH_SORT, ENABLE_DEPTH_TEST, ENABLE_NATIVE_FONTS, ENABLE_OPENGL_2X_SMOOTH, ENABLE_OPENGL_4X_SMOOTH, ENABLE_OPENGL_ERROR_REPORT, ENTER, EPSILON, ER, ERODE, ERROR_BACKGROUND_IMAGE_FORMAT, ERROR_BACKGROUND_IMAGE_SIZE, ERROR_PUSHMATRIX_OVERFLOW, ERROR_PUSHMATRIX_UNDERFLOW, ERROR_TEXTFONT_NULL_PFONT, ESC, EXCLUSION, G, GIF, GRAY, GREEN_MASK, HALF_PI, HAND, HARD_LIGHT, HINT_COUNT, HSB, IMAGE, INVERT, JAVA2D, JPEG, LEFT, LIGHTEST, LINE, LINES, LINUX, MACOSX, MAX_FLOAT, MAX_INT, MIN_FLOAT, MIN_INT, MITER, MODEL, MULTIPLY, NORMAL, NORMALIZED, NX, NY, NZ, OPAQUE, OPEN, OPENGL, ORTHOGRAPHIC, OTHER, OVERLAY, P2D, P3D, PATH, PDF, PERSPECTIVE, PI, platformNames, POINT, POINTS, POLYGON, POSTERIZE, PROBLEM, PROJECT, QUAD, QUAD_STRIP, QUADS, QUARTER_PI, R, RAD_TO_DEG, RADIUS, RECT, RED_MASK, REPLACE, RETURN, RGB, RIGHT, ROUND, SA, SB, SCREEN, SG, SHAPE, SHIFT, SHINE, SOFT_LIGHT, SPB, SPG, SPHERE, SPOT, SPR, SQUARE, SR, SUBTRACT, SW, TAB, TARGA, THIRD_PI, THRESHOLD, TIFF, TOP, TRIANGLE, TRIANGLE_FAN, TRIANGLE_STRIP, TRIANGLES, TWO_PI, TX, TY, TZ, U, UP, V, VERTEX_FIELD_COUNT, VW, VX, VY, VZ, WAIT, WHITESPACE, WINDOWS, X, Y, Z
 
Constructor Summary
RiWordnetSupport()
           
RiWordnetSupport(processing.core.PApplet pApplet)
           
 
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)
           
static void main(java.lang.String[] args)
           
 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)
           
 
Methods inherited from class rita.RiObject
dispose, getId, getPApplet, nextId
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RITA_WORDNET_URL

public static final java.lang.String RITA_WORDNET_URL
See Also:
Constant Field Values

RITA_WORDNET_CLASS

public static final java.lang.String RITA_WORDNET_CLASS
See Also:
Constant Field Values
Constructor Detail

RiWordnetSupport

public RiWordnetSupport()
Invisible:

RiWordnetSupport

public RiWordnetSupport(processing.core.PApplet pApplet)
Method Detail

main

public static void main(java.lang.String[] args)

exists

public boolean exists(java.lang.String word)
Description copied from interface: RiWordnetIF
Checks the existence of a 'word' in the ontology

Specified by:
exists in interface RiWordnetIF

filter

public java.lang.String[] filter(int filterFlag,
                                 java.lang.String word,
                                 java.lang.String pos,
                                 int maxResults)
Description copied from interface: RiWordnetIF
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                
 

Specified by:
filter in interface RiWordnetIF

filter

public java.lang.String[] filter(int filterFlag,
                                 java.lang.String word,
                                 java.lang.String pos)
Specified by:
filter in interface RiWordnetIF

getAllAlsoSees

public java.lang.String[] getAllAlsoSees(java.lang.String query,
                                         java.lang.String pos)
Description copied from interface: RiWordnetIF
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...]

Specified by:
getAllAlsoSees in interface RiWordnetIF

getAllAntonyms

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

Specified by:
getAllAntonyms in interface RiWordnetIF

getAllCoordinates

public java.lang.String[] getAllCoordinates(java.lang.String query,
                                            java.lang.String pos)
Description copied from interface: RiWordnetIF
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

Specified by:
getAllCoordinates in interface RiWordnetIF

getAllDerivedTerms

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

Specified by:
getAllDerivedTerms in interface RiWordnetIF

getAllExamples

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

Specified by:
getAllExamples in interface RiWordnetIF

getAllGlosses

public java.lang.String[] getAllGlosses(java.lang.String word,
                                        java.lang.String pos)
Description copied from interface: RiWordnetIF
Returns glosses for all senses of 'word' with 'pos', or null if not found

Specified by:
getAllGlosses in interface RiWordnetIF

getAllHolonyms

public java.lang.String[] getAllHolonyms(java.lang.String query,
                                         java.lang.String pos)
Description copied from interface: RiWordnetIF
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...]

Specified by:
getAllHolonyms in interface RiWordnetIF

getAllHypernyms

public java.lang.String[] getAllHypernyms(java.lang.String word,
                                          java.lang.String posStr)
Description copied from interface: RiWordnetIF
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

Specified by:
getAllHypernyms in interface RiWordnetIF

getAllHyponyms

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

Specified by:
getAllHyponyms in interface RiWordnetIF

getAllMeronyms

public java.lang.String[] getAllMeronyms(java.lang.String query,
                                         java.lang.String pos)
Description copied from interface: RiWordnetIF
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...]

Specified by:
getAllMeronyms in interface RiWordnetIF

getAllNominalizations

public java.lang.String[] getAllNominalizations(java.lang.String query,
                                                java.lang.String pos)
Description copied from interface: RiWordnetIF
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]

Specified by:
getAllNominalizations in interface RiWordnetIF

getAllSimilar

public java.lang.String[] getAllSimilar(java.lang.String query,
                                        java.lang.String pos)
Description copied from interface: RiWordnetIF
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...]

Specified by:
getAllSimilar in interface RiWordnetIF

getAllSynonyms

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

Specified by:
getAllSynonyms in interface RiWordnetIF

getAllSynonyms

public java.lang.String[] getAllSynonyms(int id)
Specified by:
getAllSynonyms in interface RiWordnetIF

getAllSynonyms

public java.lang.String[] getAllSynonyms(java.lang.String word,
                                         java.lang.String posStr,
                                         int maxResults)
Description copied from interface: RiWordnetIF
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

Specified by:
getAllSynonyms in interface RiWordnetIF

getAllSynonyms

public java.lang.String[] getAllSynonyms(java.lang.String word,
                                         java.lang.String posStr)
Specified by:
getAllSynonyms in interface RiWordnetIF

getAllSynsets

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

Specified by:
getAllSynsets in interface RiWordnetIF

getAllVerbGroups

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

Specified by:
getAllVerbGroups in interface RiWordnetIF

getAlsoSees

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

Specified by:
getAlsoSees in interface RiWordnetIF

getAlsoSees

public java.lang.String[] getAlsoSees(java.lang.String query,
                                      java.lang.String pos)
Description copied from interface: RiWordnetIF
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...]

Specified by:
getAlsoSees in interface RiWordnetIF

getAnagrams

public java.lang.String[] getAnagrams(java.lang.String word,
                                      java.lang.String posStr,
                                      int maxResults)
Description copied from interface: RiWordnetIF
Returns up to maxResults full anagram matches for the specified word and pos

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

Specified by:
getAnagrams in interface RiWordnetIF

getAnagrams

public java.lang.String[] getAnagrams(java.lang.String word,
                                      java.lang.String posStr)
Description copied from interface: RiWordnetIF
Returns all full anagram matches for the specified word and pos

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

Specified by:
getAnagrams in interface RiWordnetIF

getAntonyms

public java.lang.String[] getAntonyms(int id)
Description copied from interface: RiWordnetIF
Returns String[] of Antonyms for the specified id, or null if not found
Holds for adjectives only (?)

Specified by:
getAntonyms in interface RiWordnetIF

getAntonyms

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

Specified by:
getAntonyms in interface RiWordnetIF

getAnyExample

public java.lang.String getAnyExample(java.lang.CharSequence word,
                                      java.lang.CharSequence pos)
Description copied from interface: RiWordnetIF
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

Specified by:
getAnyExample in interface RiWordnetIF

getBestPos

public java.lang.String getBestPos(java.lang.String word)
Description copied from interface: RiWordnetIF
Returns most-common pos according to polysemy count, returning the pos with the most different senses.

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

getCommonParents

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

Specified by:
getCommonParents in interface RiWordnetIF

getContains

public java.lang.String[] getContains(java.lang.String word,
                                      java.lang.String posStr,
                                      int maxResults)
Description copied from interface: RiWordnetIF
Returns up to maxResults of the specified pos where each contains the given word

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

Specified by:
getContains in interface RiWordnetIF

getContains

public java.lang.String[] getContains(java.lang.String word,
                                      java.lang.String posStr)
Description copied from interface: RiWordnetIF
Returns all 'contains' matches for the specified word and pos

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

Specified by:
getContains in interface RiWordnetIF

getCoordinates

public java.lang.String[] getCoordinates(int id)
Description copied from interface: RiWordnetIF
Returns String[] of Coordinates for the specified id, or null if not found

Specified by:
getCoordinates in interface RiWordnetIF

getCoordinates

public java.lang.String[] getCoordinates(java.lang.String query,
                                         java.lang.String pos)
Description copied from interface: RiWordnetIF
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

Specified by:
getCoordinates in interface RiWordnetIF

getDerivedTerms

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

Specified by:
getDerivedTerms in interface RiWordnetIF

getDerivedTerms

public java.lang.String[] getDerivedTerms(java.lang.String query,
                                          java.lang.String pos)
Description copied from interface: RiWordnetIF
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]

Specified by:
getDerivedTerms in interface RiWordnetIF

getDescription

public java.lang.String getDescription(int senseId)
Description copied from interface: RiWordnetIF
Returns description for word with unique senseId, or null if not found

Specified by:
getDescription in interface RiWordnetIF

getDescription

public java.lang.String getDescription(java.lang.String word,
                                       java.lang.String pos)
Description copied from interface: RiWordnetIF
Returns description for word with pos or null if not found

Specified by:
getDescription in interface RiWordnetIF

getDistance

public float getDistance(java.lang.String lemma1,
                         java.lang.String lemma2,
                         java.lang.String pos)
Description copied from interface: RiWordnetIF
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

Specified by:
getDistance in interface RiWordnetIF

getEndsWith

public java.lang.String[] getEndsWith(java.lang.String word,
                                      java.lang.String posStr,
                                      int maxResults)
Description copied from interface: RiWordnetIF
Returns up to maxResults of the specified pos ending with the given word.

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

Specified by:
getEndsWith in interface RiWordnetIF

getEndsWith

public java.lang.String[] getEndsWith(java.lang.String word,
                                      java.lang.String posStr)
Description copied from interface: RiWordnetIF
Returns up to maxResults of the specified pos ending with the given word.

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

Specified by:
getEndsWith in interface RiWordnetIF

getExamples

public java.lang.String[] getExamples(java.lang.CharSequence word,
                                      java.lang.CharSequence pos)
Description copied from interface: RiWordnetIF
Returns all examples for 1st sense of word with pos, or null if not found

Specified by:
getExamples in interface RiWordnetIF

getExamples

public java.lang.String[] getExamples(int senseId)
Description copied from interface: RiWordnetIF
Returns examples for word with unique senseId, or null if not found

Specified by:
getExamples in interface RiWordnetIF

getGloss

public java.lang.String getGloss(int senseId)
Description copied from interface: RiWordnetIF
Returns full gloss for word with unique senseId, or null if not found

Specified by:
getGloss in interface RiWordnetIF

getGloss

public java.lang.String getGloss(java.lang.String word,
                                 java.lang.String pos)
Description copied from interface: RiWordnetIF
Returns full gloss for !st sense of 'word' with 'pos' or null if not found

Specified by:
getGloss in interface RiWordnetIF

getHolonyms

public java.lang.String[] getHolonyms(int id)
Description copied from interface: RiWordnetIF
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...]

Specified by:
getHolonyms in interface RiWordnetIF

getHolonyms

public java.lang.String[] getHolonyms(java.lang.String query,
                                      java.lang.String pos)
Description copied from interface: RiWordnetIF
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...]

Specified by:
getHolonyms in interface RiWordnetIF

getHypernyms

public java.lang.String[] getHypernyms(int id)
Description copied from interface: RiWordnetIF
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:

Specified by:
getHypernyms in interface RiWordnetIF

getHypernyms

public java.lang.String[] getHypernyms(java.lang.String word,
                                       java.lang.String posStr)
Description copied from interface: RiWordnetIF
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:

Specified by:
getHypernyms in interface RiWordnetIF

getHypernymTree

public java.lang.String[] getHypernymTree(int id)
Description copied from interface: RiWordnetIF
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

Specified by:
getHypernymTree in interface RiWordnetIF

getHyponyms

public java.lang.String[] getHyponyms(int id)
Description copied from interface: RiWordnetIF
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:

Specified by:
getHyponyms in interface RiWordnetIF

getHyponyms

public java.lang.String[] getHyponyms(java.lang.String word,
                                      java.lang.String posStr)
Description copied from interface: RiWordnetIF
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:

Specified by:
getHyponyms in interface RiWordnetIF

getHyponymTree

public java.lang.String[] getHyponymTree(int id)
Description copied from interface: RiWordnetIF
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

Specified by:
getHyponymTree in interface RiWordnetIF

getMeronyms

public java.lang.String[] getMeronyms(int id)
Description copied from interface: RiWordnetIF
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...]

Specified by:
getMeronyms in interface RiWordnetIF

getMeronyms

public java.lang.String[] getMeronyms(java.lang.String query,
                                      java.lang.String pos)
Description copied from interface: RiWordnetIF
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...]

Specified by:
getMeronyms in interface RiWordnetIF

getNominalizations

public java.lang.String[] getNominalizations(int id)
Description copied from interface: RiWordnetIF
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]

Specified by:
getNominalizations in interface RiWordnetIF

getNominalizations

public java.lang.String[] getNominalizations(java.lang.String query,
                                             java.lang.String pos)
Description copied from interface: RiWordnetIF
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]

Specified by:
getNominalizations in interface RiWordnetIF

getPos

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

getPos

public java.lang.String[] getPos(java.lang.String word)
Description copied from interface: RiWordnetIF
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.

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

getRandomExample

public java.lang.String getRandomExample(java.lang.CharSequence pos)
Description copied from interface: RiWordnetIF
Returns a random example from a random word w' pos

Specified by:
getRandomExample in interface RiWordnetIF
Returns:
random example

getRandomExamples

public java.lang.String[] getRandomExamples(java.lang.CharSequence pos,
                                            int numExamples)
Description copied from interface: RiWordnetIF
Returns numExamples random examples from random words w' pos

Specified by:
getRandomExamples in interface RiWordnetIF
Returns:
random examples

getRandomWord

public java.lang.String getRandomWord(java.lang.CharSequence pos,
                                      boolean stemsOnly,
                                      int maxChars)
Description copied from interface: RiWordnetIF
Returns a random word with pos and a maximum of maxChars.

Specified by:
getRandomWord in interface RiWordnetIF
Returns:
a random word or null if none is found

getRandomWord

public java.lang.String getRandomWord(java.lang.CharSequence pos)
Description copied from interface: RiWordnetIF
Returns a random stem with pos and a max length of this.maxCharsPerWord.

Specified by:
getRandomWord in interface RiWordnetIF
Returns:
random word

getRandomWords

public java.lang.String[] getRandomWords(java.lang.CharSequence pos,
                                         int count)
Description copied from interface: RiWordnetIF
Returns count random words w' pos

Specified by:
getRandomWords in interface RiWordnetIF
Returns:
String[] of random words

getRegexMatch

public java.lang.String[] getRegexMatch(java.lang.String pattern,
                                        java.lang.String posStr,
                                        int maxResults)
Description copied from interface: RiWordnetIF
Returns up to maxResults of the specified pos matching the the given regular expression pattern.

Specified by:
getRegexMatch in interface RiWordnetIF
See Also:
Pattern

getRegexMatch

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

Specified by:
getRegexMatch in interface RiWordnetIF
See Also:
Pattern

getSenseCount

public int getSenseCount(java.lang.String word,
                         java.lang.String pos)
Description copied from interface: RiWordnetIF
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.

Specified by:
getSenseCount in interface RiWordnetIF
Returns:
# of senses or -1 if not found

getSenseIds

public int[] getSenseIds(java.lang.String word,
                         java.lang.String posStr)
Description copied from interface: RiWordnetIF
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

Specified by:
getSenseIds in interface RiWordnetIF

getSimilar

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

Specified by:
getSimilar in interface RiWordnetIF

getSimilar

public java.lang.String[] getSimilar(java.lang.String query,
                                     java.lang.String pos)
Description copied from interface: RiWordnetIF
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...]

Specified by:
getSimilar in interface RiWordnetIF

getSoundsLike

public java.lang.String[] getSoundsLike(java.lang.String pattern,
                                        java.lang.String posStr,
                                        int maxResults)
Description copied from interface: RiWordnetIF
Returns up to maxResults of the specified pos that match the soundex code of the given word.

Specified by:
getSoundsLike in interface RiWordnetIF

getSoundsLike

public java.lang.String[] getSoundsLike(java.lang.String pattern,
                                        java.lang.String posStr)
Description copied from interface: RiWordnetIF
Returns up to maxResults of the specified pos that match the soundex code of the given word.

Specified by:
getSoundsLike in interface RiWordnetIF

getStartsWith

public java.lang.String[] getStartsWith(java.lang.String word,
                                        java.lang.String posStr,
                                        int maxResults)
Description copied from interface: RiWordnetIF
Returns up to maxResults of the specified pos starting with the given word.

Example: 'turn' returns 'turntable'

Specified by:
getStartsWith in interface RiWordnetIF

getStartsWith

public java.lang.String[] getStartsWith(java.lang.String word,
                                        java.lang.String posStr)
Description copied from interface: RiWordnetIF
Returns up to maxResults of the specified pos starting with the given word.

Example: 'turn' returns 'turntable'

Specified by:
getStartsWith in interface RiWordnetIF

getStems

public java.lang.String[] getStems(java.lang.String query,
                                   java.lang.CharSequence pos)
Description copied from interface: RiWordnetIF
Returns an array of all stems, or null if not found

Specified by:
getStems in interface RiWordnetIF

getSynonyms

public java.lang.String[] getSynonyms(java.lang.String word,
                                      java.lang.String posStr,
                                      int maxResults)
Description copied from interface: RiWordnetIF
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

Specified by:
getSynonyms in interface RiWordnetIF

getSynonyms

public java.lang.String[] getSynonyms(java.lang.String word,
                                      java.lang.String posStr)
Description copied from interface: RiWordnetIF
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

Specified by:
getSynonyms in interface RiWordnetIF

getSynset

public java.lang.String[] getSynset(int id)
Description copied from interface: RiWordnetIF
Returns String[] of Synsets for unique id id or null if not found.

Specified by:
getSynset in interface RiWordnetIF

getSynset

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

Specified by:
getSynset in interface RiWordnetIF

getSynset

public java.lang.String[] getSynset(java.lang.String word,
                                    java.lang.String pos)
Description copied from interface: RiWordnetIF
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.

Specified by:
getSynset in interface RiWordnetIF
See Also:
RiWordnetIF.getSynset(String, String, boolean)

getVerbGroup

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

Specified by:
getVerbGroup in interface RiWordnetIF

getVerbGroup

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

Specified by:
getVerbGroup in interface RiWordnetIF

getWildcardMatch

public java.lang.String[] getWildcardMatch(java.lang.String pattern,
                                           java.lang.String posStr,
                                           int maxResults)
Description copied from interface: RiWordnetIF
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.)

Specified by:
getWildcardMatch in interface RiWordnetIF

getWildcardMatch

public java.lang.String[] getWildcardMatch(java.lang.String pattern,
                                           java.lang.String posStr)
Description copied from interface: RiWordnetIF
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.)

Specified by:
getWildcardMatch in interface RiWordnetIF

ignoreCompoundWords

public void ignoreCompoundWords(boolean ignoreCompoundWords)
Specified by:
ignoreCompoundWords in interface RiWordnetIF

ignoreUpperCaseWords

public void ignoreUpperCaseWords(boolean ignoreUpperCaseWords)
Specified by:
ignoreUpperCaseWords in interface RiWordnetIF

isAdjective

public boolean isAdjective(java.lang.String word)
Specified by:
isAdjective in interface RiWordnetIF

isAdverb

public boolean isAdverb(java.lang.String word)
Specified by:
isAdverb in interface RiWordnetIF

isIgnoringCompoundWords

public boolean isIgnoringCompoundWords()
Specified by:
isIgnoringCompoundWords in interface RiWordnetIF

isIgnoringUpperCaseWords

public boolean isIgnoringUpperCaseWords()
Specified by:
isIgnoringUpperCaseWords in interface RiWordnetIF

isNoun

public boolean isNoun(java.lang.String word)
Specified by:
isNoun in interface RiWordnetIF

isStem

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

Specified by:
isStem in interface RiWordnetIF

isVerb

public boolean isVerb(java.lang.String word)
Specified by:
isVerb in interface RiWordnetIF

orFilter

public java.lang.String[] orFilter(int[] filterFlags,
                                   java.lang.String[] words,
                                   java.lang.String pos,
                                   int maxResults)
Description copied from interface: RiWordnetIF
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                
 

Specified by:
orFilter in interface RiWordnetIF

orFilter

public java.lang.String[] orFilter(int[] filterFlag,
                                   java.lang.String[] word,
                                   java.lang.String pos)
Specified by:
orFilter in interface RiWordnetIF

printHypernymTree

public void printHypernymTree(int senseId)
Description copied from interface: RiWordnetIF
Prints the full hypernym tree to System.out (primarily for debugging).

Specified by:
printHypernymTree in interface RiWordnetIF

printHyponymTree

public void printHyponymTree(int senseId)
Description copied from interface: RiWordnetIF
Prints the full hyponym tree to System.out (primarily for debugging).

Specified by:
printHyponymTree in interface RiWordnetIF

removeNonExistent

public void removeNonExistent(java.util.Collection words)
Description copied from interface: RiWordnetIF
Check each word in 'words' and removes those that don't exist in the ontology.

Note: destructive operation

Specified by:
removeNonExistent in interface RiWordnetIF

setWordnetHome

public void setWordnetHome(java.lang.String wordnetHome)
Specified by:
setWordnetHome in interface RiWordnetIF