## RiWordNet (Java-only)

Description

Provides support for access to the WordNet ontological database. Note that WordNet data files are no longer supplied as part of the installation. Please download the version (3.x is recommended) for your platform here. The examples below assume the following installation structure (linux/unix/osx):

/path/to/WordNet3.1
/path/to/WordNet3.1/dict/
/path/to/WordNet3.1/dict/data.noun
...

Construct a RiWordNet object like so:
   RiWordNet wordnet = new RiWordNet("/path/to/WordNet3.1");

or, on Windows:
   RiWordNet wordnet = new RiWordNet("c:\\path\\to\\WordNet3.0");

Generally three methods are provided for each relation type. Using hypernyms as an example:
 getHyponyms(int id);

getHyponyms(String word, String pos)

getAllHyponyms(String word, String pos).
The 1st version returns hyponyms for a specific sense (as specified by its unique id), the 2nd returns hyponyms for the most common sense, and the 3rd returns hyponyms for ALL senses for the word/pos pair.

You can also retrieve the entire tree of hyponyms (down to the leaves) for a specific sense of a word.

These can be specified either as a literal (e.g., "n") or using the constants:

    RiWordNet.NOUN
RiWordNet.VERB


NOTE:  Methods returning a String[] will return a zero-length array when the query term is not found or there are no entries for the relation type being sought, rather than null (as in the original version of this library).

NOTE:  Methods returning a String[] will return results in randomized order. To disable this behavior, call wordnet.randomizeResults(false);

RiWordNet(String wordnetInstallDir);RiWordNet(String wordnetInstallDir, boolean ignoreCompoundWords);RiWordNet("/path/to/WordNet3.1", boolean ignoreCompoundWords, boolean ignoreUpperCaseWords);