WordnetAPI is a Java interface to the famous WordNet database of lexical relationships.
It converts the Wordnet Dictionary in an SQL Database (currently H2) and access the data through the Java Persistence API (currently Toplink), providing a stictly object-oriented interface, instead of the procedural one in the original Wordnet C library.
This is the domain model:
The access to entities happens with the DAO Pattern.
To look for a lemma in the dictionary:
WordnetDictionary dictionary = new WordnetDictionary(); String lemma = "conceptualization"; List<Word> result = dictionary.lookup(lemma);
In WordnetCLI the result is also formatted:
LEMMA: conceptualization (NOUN noun.act): inventing or contriving an idea or explanation and formulating it mentally SEMANTIC SET: SAME: formulation (NOUN noun.act): inventing or contriving an idea or explanation and formulating it mentally conceptualisation (NOUN noun.act): inventing or contriving an idea or explanation and formulating it mentally DERIVATIONALLY_RELATED_FORM: conceptualize (VERB verb.creation): have the idea for; "He conceived of a robot that would help paralyzed patients"; "This library was well conceived" HYPERNYM: creating_by_mental_acts (NOUN noun.act): the act of creating something by thinking HYPONYM: plan_of_attack (NOUN noun.act): ideas or actions intended to deal with a problem or situation; "his approach to every problem is to draw up a list of pros and cons"; "an attack on inflation"; "his plan of attack was misguided" framing (NOUN noun.act): formulation of the plans and important details; "the framing of judicial decrees" attack (NOUN noun.act): ideas or actions intended to deal with a problem or situation; "his approach to every problem is to draw up a list of pros and cons"; "an attack on inflation"; "his plan of attack was misguided" approach (NOUN noun.act): ideas or actions intended to deal with a problem or situation; "his approach to every problem is to draw up a list of pros and cons"; "an attack on inflation"; "his plan of attack was misguided" LEMMA: conceptualization (NOUN noun.cognition): an elaborated concept SEMANTIC SET: SAME: conceptualisation (NOUN noun.cognition): an elaborated concept conceptuality (NOUN noun.cognition): an elaborated concept DERIVATIONALLY_RELATED_FORM: conceptualize (VERB verb.creation): have the idea for; "He conceived of a robot that would help paralyzed patients"; "This library was well conceived" HYPERNYM: concept (NOUN noun.cognition): an abstract or general idea inferred or derived from specific instances construct (NOUN noun.cognition): an abstract or general idea inferred or derived from specific instances conception (NOUN noun.cognition): an abstract or general idea inferred or derived from specific instances HYPONYM: perception (NOUN noun.cognition): a way of conceiving something; "Luther had a new perception of the Bible"
Given an inflected form, you can retrieve the base forms using the Wordnet's morphological processing. For example:
Morphy morphy = new Morphy(); String[] baseforms = morphy.stem("axes");
will be return "axis", "ax", "axe"
More code usage examples in the unit-tests source folder.