|
Java Access to WordNet | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
An interface describing methods that can be called via RMI to access the WordNet database.
| Field Summary | |
static String |
adjPos
The constant representing an adjective in WordNet. |
static int |
adjPosIdx
The integer constant representing an adjective in WordNet. |
static String |
advPos
The constant representing an adverb in WordNet. |
static int |
advPosIdx
The integer constant representing an adverb in WordNet. |
static int |
maxPosIdx
The maximum integer constant used to represent parts of speech. |
static int |
minPosIdx
The minimum integer constant used to represent parts of speech. |
static String |
nounPos
The constant representing a noun in WordNet. |
static int |
nounPosIdx
The integer constant representing a noun in WordNet. |
static int |
numPartsOfSpeech
The total number of parts of speech in WordNet, collapsing adjective satellites to be adjectives, i.e., 4. |
static String |
verbPos
The constant representing a verb in WordNet. |
static int |
verbPosIdx
The integer constant representing a verb in WordNet. |
| Method Summary | |
boolean |
contains(String word,
String pos)
Returns whether a given word and part of speech exist in the database. |
boolean |
exists(String word,
String pos)
Returns whether a given word and part of speech exist in the database. |
int[][] |
getAllParentsBFS(String pos,
int synset)
Returns a breadth-first search of the hypernym subgraph of synset. |
int[] |
getAllSynsets(String word,
String pos)
Gets all synsets for word and pos. |
RemoteEnumeration |
getCachedDataEntries(int posIdx)
Returns a RemoteEnumeraton to allow iteration over all cached
data entries. |
RemoteEnumeration |
getCachedDataEntries(String pos)
Returns a RemoteEnumeraton to allow iteration over all cached
data entries. |
RemoteEnumeration |
getCachedIndexEntries(int posIdx)
Returns an RemoteEnumeraton to allow iteration over all
cached index entries. |
RemoteEnumeration |
getCachedIndexEntries(String pos)
Returns an RemoteEnumeraton to allow iteration over all
cached index entries. |
WNPointer[] |
getChildPointers(String pos,
int synset)
Gets the child (hyponym) pointers for the synset specified by pos and synset, as defined by pointers that pass
through ChildSemanticPointerFilter. |
int[] |
getChildren(String pos,
int synset)
Gets all synsets that are children (hyponyms) of synset. |
WNDataEntry |
getDataEntry(String pos,
int synset)
Gets the WNDataEntry object for pos and synset. |
WNIndexEntry |
getIndexEntry(String word,
String pos)
Gets the WNIndexEntry for word and pos,
printing errors if there is no such word-pos pair in the database. |
WNIndexEntry |
getIndexEntry(String word,
String pos,
boolean printErrors)
Gets the WNIndexEntry for word and pos. |
WNPointer[] |
getParentPointers(String pos,
int synset)
Gets the parent (hypernym) pointers for the synset specified by pos and synset, as defined by pointers that pass
through ParentSemanticPointerFilter. |
int[] |
getParents(String pos,
int synset)
Gets all synsets that are parents (hypernyms) of synset. |
int |
getSenseNum(String word,
String pos,
int synset)
Gets the sense number for the passed synset of
word and pos. |
int |
getSynset(String word,
String pos,
int senseNum)
Gets the senseNumth synset for word
and pos. |
WNWord |
getSynsetName(String pos,
int synset)
Gets the name of a synset. |
| Field Detail |
public static final String verbPos
public static final String nounPos
public static final String adjPos
public static final String advPos
public static final int nounPosIdx
public static final int verbPosIdx
public static final int adjPosIdx
public static final int advPosIdx
public static final int minPosIdx
public static final int maxPosIdx
public static final int numPartsOfSpeech
| Method Detail |
public boolean contains(String word,
String pos)
throws RemoteException
word - a lemma in WordNet.pos - a WordNet part of speech.
RemoteException
public boolean exists(String word,
String pos)
throws RemoteException
contains(java.lang.String, java.lang.String).
word - a lemma in WordNet.pos - a WordNet part of speech.
RemoteException
public WNIndexEntry getIndexEntry(String word,
String pos)
throws RemoteException
word and pos,
printing errors if there is no such word-pos pair in the database.
word - a lemma in WordNet.pos - a WordNet part of speech.
RemoteException
public WNIndexEntry getIndexEntry(String word,
String pos,
boolean printErrors)
throws RemoteException
word and pos.
word - a lemma in WordNet.pos - a WordNet part of speech.printErrors - print errors using WordNet.printError(java.lang.String) if true.
RemoteException
public WNDataEntry getDataEntry(String pos,
int synset)
throws RemoteException
pos and synset.
pos - a WordNet part of speech.synset - a synset in WordNet.
RemoteException
public int[] getAllSynsets(String word,
String pos)
throws RemoteException
word and pos.
word - a lemma in WordNet.pos - a WordNet part of speech.
RemoteExceptionWNIndexEntry.getSynsets()
public int getSynset(String word,
String pos,
int senseNum)
throws RemoteException
senseNumth synset for word
and pos. Note that this is the
senseNum - 1st element in the array
returned by getAllSynsets(java.lang.String, java.lang.String), as sense numbers are 1-indexed.
RemoteException
public int getSenseNum(String word,
String pos,
int synset)
throws RemoteException
synset of
word and pos.
N.B.: This method is O(n), where n is the number of
synsets for word, pos.
RemoteException
public WNPointer[] getParentPointers(String pos,
int synset)
throws RemoteException
pos and synset, as defined by pointers that pass
through ParentSemanticPointerFilter.
pos - a WordNet part of speech.synset - a WordNet synset.
RemoteException
public int[] getParents(String pos,
int synset)
throws RemoteException
synset.
A cache is used for these parent-synset int arrays.
pos - a WordNet part of speech.synset - a WordNet synset.
RemoteException
public WNPointer[] getChildPointers(String pos,
int synset)
throws RemoteException
pos and synset, as defined by pointers that pass
through ChildSemanticPointerFilter.
pos - a WordNet part of speechsynset - a WordNet synset
RemoteException
public int[] getChildren(String pos,
int synset)
throws RemoteException
synset.
A cache is used for these child-synset int arrays.
pos - a WordNet part of speech.synset - a WordNet synset.
RemoteException
public WNWord getSynsetName(String pos,
int synset)
throws RemoteException
pos - a WordNet part of speech.synset - a WordNet synset.
WNWord object that represents the first lemma
in the list of lemmas for synset in the database.
RemoteException
public int[][] getAllParentsBFS(String pos,
int synset)
throws RemoteException
synset.
pos - a WordNet part of speech.synset - a WordNet synset.
int arrays, where the
ith element contains all synsets that have a hyponym
path of length i to synset. Thus, the first element
is guaranteed to be an array of length 1 containing only
synset. Furthermore, since adjectives and adverbs do not
have hypernyms, the return value for these two parts of speech is always
of length 1.
RemoteException
public RemoteEnumeration getCachedDataEntries(String pos)
throws RemoteException
RemoteEnumeraton to allow iteration over all cached
data entries. Note that RemoteEnumeration objects, like the
Enumeration objects they wrap, are fail-fast, and are even
more brittle in that a RemoteException could be raised
at any time.
RemoteException
public RemoteEnumeration getCachedDataEntries(int posIdx)
throws RemoteException
RemoteEnumeraton to allow iteration over all cached
data entries. Note that RemoteEnumeration objects, like the
Enumeration objects they wrap, are fail-fast, and are even
more brittle in that a RemoteException could be raised
at any time.
RemoteException
public RemoteEnumeration getCachedIndexEntries(String pos)
throws RemoteException
RemoteEnumeraton to allow iteration over all
cached index entries. Note that RemoteEnumeration objects,
like the Enumeration objects they wrap, are fail-fast, and
are even more brittle in that a RemoteException could be
raised at any time.
RemoteException
public RemoteEnumeration getCachedIndexEntries(int posIdx)
throws RemoteException
RemoteEnumeraton to allow iteration over all
cached index entries. Note that RemoteEnumeration objects,
like the Enumeration objects they wrap, are fail-fast, and
are even more brittle in that a RemoteException could be
raised at any time.
RemoteException
|
Java Access to WordNet | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||