|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectinfo.ephyra.nlp.semantics.ontologies.WordNet
public class WordNet
An interface to WordNet, a lexical database for the English language.
This class implements the interface Ontology.
| Field Summary | |
|---|---|
static net.didion.jwnl.data.POS |
ADJECTIVE
Indicates that a word is an adjective. |
static net.didion.jwnl.data.POS |
ADVERB
Indicates that a word is an adverb. |
private static double |
CAUSING_WEIGHT
Weight for the relation 'causing'. |
private static net.didion.jwnl.dictionary.Dictionary |
dict
WordNet dictionary. |
private static double |
ENTAILING_WEIGHT
Weight for the relation 'entailing'. |
private static double |
HAS_MEMBER_WEIGHT
Weight for the relation 'has-member'. |
private static double |
HAS_PART_WEIGHT
Weight for the relation 'has-part'. |
private static double |
HAS_SUBSTANCE_WEIGHT
Weight for the relation 'has-substance'. |
private static double |
HYPERNYM_WEIGHT
Weight for the relation 'hypernym'. |
private static double |
HYPONYM_WEIGHT
Weight for the relation 'hyponym'. |
static int |
MAX_PATH_LENGTH
Maximum length of a path to an expansion. |
private static double |
MEMBER_OF_WEIGHT
Weight for the relation 'member-of'. |
static net.didion.jwnl.data.POS |
NOUN
Indicates that a word is a noun. |
private static double |
PART_OF_WEIGHT
Weight for the relation 'part-of'. |
private static double |
SUBSTANCE_OF_WEIGHT
Weight for the relation 'substance-of'. |
private static double |
SYNONYM_WEIGHT
Weight for the relation 'synonym'. |
static net.didion.jwnl.data.POS |
VERB
Indicates that a word is a verb. |
| Constructor Summary | |
|---|---|
WordNet()
|
|
| Method Summary | |
|---|---|
boolean |
contains(java.lang.String word)
Looks up a word. |
java.util.Map<java.lang.String,java.lang.Double> |
expandEntity(java.lang.String entity)
Expands an entity by looking up related entities. |
java.util.Map<java.lang.String,java.lang.Double> |
expandEvent(java.lang.String event)
Expands an event by looking up related events. |
java.util.Map<java.lang.String,java.lang.Double> |
expandModifier(java.lang.String modifier,
net.didion.jwnl.data.POS pos)
Expands a modifier by looking up related modifiers. |
static java.lang.String[] |
getCausing(java.lang.String verb)
Looks up verbs that cause the given verb, assuming that it is used in its most common sense. |
private static net.didion.jwnl.data.Synset[] |
getCausingSynsets(net.didion.jwnl.data.Synset synset)
|
private static net.didion.jwnl.data.Synset |
getCommonSynset(java.lang.String word,
net.didion.jwnl.data.POS pos)
Looks up the most common synset of a word. |
static java.lang.String |
getCompoundLemma(java.lang.String word,
net.didion.jwnl.data.POS pos)
Looks up the lemma of a compound word. |
static java.lang.String[] |
getEntailing(java.lang.String verb)
Looks up verbs that entail the given verb, assuming that it is used in its most common sense. |
private static net.didion.jwnl.data.Synset[] |
getEntailingSynsets(net.didion.jwnl.data.Synset synset)
|
private static net.didion.jwnl.data.Synset[] |
getHasMemberSynsets(net.didion.jwnl.data.Synset synset)
|
private static net.didion.jwnl.data.Synset[] |
getHasPartSynsets(net.didion.jwnl.data.Synset synset)
|
private static net.didion.jwnl.data.Synset[] |
getHasSubstanceSynsets(net.didion.jwnl.data.Synset synset)
|
static java.lang.String[] |
getHaveMember(java.lang.String noun)
Looks up member meronyms of the given noun, assuming that it is used in its most common sense. |
static java.lang.String[] |
getHavePart(java.lang.String noun)
Looks up part meronyms of the given noun, assuming that it is used in its most common sense. |
static java.lang.String[] |
getHaveSubstance(java.lang.String noun)
Looks up substance meronyms of the given noun, assuming that it is used in its most common sense. |
static java.lang.String[] |
getHypernyms(java.lang.String word,
net.didion.jwnl.data.POS pos)
Looks up hypernyms of the given word, assuming that it is used in its most common sense. |
private static net.didion.jwnl.data.Synset[] |
getHypernymSynsets(net.didion.jwnl.data.Synset synset)
|
static java.lang.String[] |
getHyponyms(net.didion.jwnl.data.POS pos,
long offset)
Looks up hyponyms of the synset with the given POS and offset. |
static java.lang.String[] |
getHyponyms(java.lang.String word,
net.didion.jwnl.data.POS pos)
Looks up hyponyms of the given word, assuming that it is used in its most common sense. |
private static net.didion.jwnl.data.Synset[] |
getHyponymSynsets(net.didion.jwnl.data.Synset synset)
|
static java.lang.String |
getLemma(java.lang.String word,
net.didion.jwnl.data.POS pos)
Looks up the lemma of a word. |
private static java.lang.String[] |
getLemmas(net.didion.jwnl.data.Synset synset)
Looks up the lemmas of the words in a synset. |
private static java.lang.String[] |
getLemmas(net.didion.jwnl.data.Synset[] synsets)
Looks up the lemmas of the words in all synsets. |
private static net.didion.jwnl.data.Synset[] |
getMemberOfSynsets(net.didion.jwnl.data.Synset synset)
|
static java.lang.String[] |
getMembersOf(java.lang.String noun)
Looks up member holonyms of the given noun, assuming that it is used in its most common sense. |
static java.lang.String[] |
getNounHyponyms(long offset)
Looks up hyponyms of the synset with POS "noun" and the given offset. |
private static net.didion.jwnl.data.Synset[] |
getPartOfSynsets(net.didion.jwnl.data.Synset synset)
|
static java.lang.String[] |
getPartsOf(java.lang.String noun)
Looks up part holonyms of the given noun, assuming that it is used in its most common sense. |
private static net.didion.jwnl.data.Synset[] |
getSubstanceOfSynsets(net.didion.jwnl.data.Synset synset)
|
static java.lang.String[] |
getSubstancesOf(java.lang.String noun)
Looks up substance holonyms of the given noun, assuming that it is used in its most common sense. |
static java.lang.String[] |
getSynonyms(java.lang.String word,
net.didion.jwnl.data.POS pos)
Looks up synonyms of the given word, assuming that it is used in its most common sense. |
private static net.didion.jwnl.data.Synset[] |
getSynsets(net.didion.jwnl.data.list.PointerTargetNodeList nodes)
Looks up the synsets that correspond to the nodes in a node list. |
static boolean |
initialize(java.lang.String properties)
Initializes the wrapper for the WordNet dictionary. |
static boolean |
isAdjective(java.lang.String word)
Checks if the word exists as an adjective. |
static boolean |
isAdverb(java.lang.String word)
Checks if the word exists as an adverb. |
static boolean |
isCompoundNoun(java.lang.String word)
Checks if the word exists as a noun. |
static boolean |
isCompoundWord(java.lang.String word)
Checks if the word exists in WordNet. |
static boolean |
isNoun(java.lang.String word)
Checks if the word exists as a noun. |
static boolean |
isVerb(java.lang.String word)
Checks if the word exists as a verb. |
static boolean |
isWord(java.lang.String word)
Checks if the word exists in WordNet. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final net.didion.jwnl.data.POS ADJECTIVE
public static final net.didion.jwnl.data.POS ADVERB
public static final net.didion.jwnl.data.POS NOUN
public static final net.didion.jwnl.data.POS VERB
public static final int MAX_PATH_LENGTH
private static final double SYNONYM_WEIGHT
private static final double HYPERNYM_WEIGHT
private static final double HYPONYM_WEIGHT
private static final double ENTAILING_WEIGHT
private static final double CAUSING_WEIGHT
private static final double MEMBER_OF_WEIGHT
private static final double SUBSTANCE_OF_WEIGHT
private static final double PART_OF_WEIGHT
private static final double HAS_MEMBER_WEIGHT
private static final double HAS_SUBSTANCE_WEIGHT
private static final double HAS_PART_WEIGHT
private static net.didion.jwnl.dictionary.Dictionary dict
| Constructor Detail |
|---|
public WordNet()
| Method Detail |
|---|
public static boolean initialize(java.lang.String properties)
properties - property filepublic static boolean isWord(java.lang.String word)
word - a word
true iff the word is in WordNetpublic static boolean isCompoundWord(java.lang.String word)
word - a word
true iff the word is in WordNetpublic static boolean isAdjective(java.lang.String word)
word - a word
true iff the word is an adjectivepublic static boolean isAdverb(java.lang.String word)
word - a word
true iff the word is an adverbpublic static boolean isNoun(java.lang.String word)
word - a word
true iff the word is a nounpublic static boolean isCompoundNoun(java.lang.String word)
word - a word
true iff the word is a nounpublic static boolean isVerb(java.lang.String word)
word - a word
true iff the word is a verb
public static java.lang.String getLemma(java.lang.String word,
net.didion.jwnl.data.POS pos)
word - a wordpos - its part of speech
null if lookup failed
public static java.lang.String getCompoundLemma(java.lang.String word,
net.didion.jwnl.data.POS pos)
word - a wordpos - its part of speech
null if lookup failed
private static net.didion.jwnl.data.Synset getCommonSynset(java.lang.String word,
net.didion.jwnl.data.POS pos)
word - a wordpos - its part of speech
null if lookup failedprivate static net.didion.jwnl.data.Synset[] getSynsets(net.didion.jwnl.data.list.PointerTargetNodeList nodes)
nodes - node list
private static java.lang.String[] getLemmas(net.didion.jwnl.data.Synset synset)
synset - a synset
private static java.lang.String[] getLemmas(net.didion.jwnl.data.Synset[] synsets)
synsets - the synsets
public static java.lang.String[] getSynonyms(java.lang.String word,
net.didion.jwnl.data.POS pos)
word - a wordpos - its part of speech
null if lookup failed
public static java.lang.String[] getHypernyms(java.lang.String word,
net.didion.jwnl.data.POS pos)
word - a wordpos - its part of speech
null if lookup failedprivate static net.didion.jwnl.data.Synset[] getHypernymSynsets(net.didion.jwnl.data.Synset synset)
public static java.lang.String[] getHyponyms(java.lang.String word,
net.didion.jwnl.data.POS pos)
word - a wordpos - its part of speech
null if lookup failed
public static java.lang.String[] getHyponyms(net.didion.jwnl.data.POS pos,
long offset)
pos - POS of the synsetoffset - offset of the synset
null if lookup failedpublic static java.lang.String[] getNounHyponyms(long offset)
offset - offset of the synset
null if lookup failedprivate static net.didion.jwnl.data.Synset[] getHyponymSynsets(net.didion.jwnl.data.Synset synset)
public static java.lang.String[] getEntailing(java.lang.String verb)
verb - a verb
null if lookup failedprivate static net.didion.jwnl.data.Synset[] getEntailingSynsets(net.didion.jwnl.data.Synset synset)
public static java.lang.String[] getCausing(java.lang.String verb)
verb - a verb
null if lookup failedprivate static net.didion.jwnl.data.Synset[] getCausingSynsets(net.didion.jwnl.data.Synset synset)
public static java.lang.String[] getMembersOf(java.lang.String noun)
noun - a noun
null if lookup failedprivate static net.didion.jwnl.data.Synset[] getMemberOfSynsets(net.didion.jwnl.data.Synset synset)
public static java.lang.String[] getSubstancesOf(java.lang.String noun)
noun - a noun
null if lookup failedprivate static net.didion.jwnl.data.Synset[] getSubstanceOfSynsets(net.didion.jwnl.data.Synset synset)
public static java.lang.String[] getPartsOf(java.lang.String noun)
noun - a noun
null if lookup failedprivate static net.didion.jwnl.data.Synset[] getPartOfSynsets(net.didion.jwnl.data.Synset synset)
public static java.lang.String[] getHaveMember(java.lang.String noun)
noun - a noun
null if lookup failedprivate static net.didion.jwnl.data.Synset[] getHasMemberSynsets(net.didion.jwnl.data.Synset synset)
public static java.lang.String[] getHaveSubstance(java.lang.String noun)
noun - a noun
null if lookup failedprivate static net.didion.jwnl.data.Synset[] getHasSubstanceSynsets(net.didion.jwnl.data.Synset synset)
public static java.lang.String[] getHavePart(java.lang.String noun)
noun - a noun
null if lookup failedprivate static net.didion.jwnl.data.Synset[] getHasPartSynsets(net.didion.jwnl.data.Synset synset)
public boolean contains(java.lang.String word)
contains in interface Dictionaryword - the word to look up
true iff the word was foundpublic java.util.Map<java.lang.String,java.lang.Double> expandEvent(java.lang.String event)
expandEvent in interface Ontologyevent - an event
public java.util.Map<java.lang.String,java.lang.Double> expandEntity(java.lang.String entity)
expandEntity in interface Ontologyentity - an entity
public java.util.Map<java.lang.String,java.lang.Double> expandModifier(java.lang.String modifier,
net.didion.jwnl.data.POS pos)
expandModifier in interface Ontologymodifier - a modifierpos - its part of speech: POS.ADJECTIVE or
POS.ADVERB
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||