Package net.didion.jwnl.data
Class IndexWordSet
java.lang.Object
net.didion.jwnl.data.IndexWordSet
A class to simplify the access to a set of
IndexWord
s, each containing
one part of speech of the same word. IndexWordSets are usually created by a
call to Dictionary.lookupAllIndexWords
.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add an IndexWord to this setboolean
It is assumed that IndexWordSets will only be created by callingDictionary.lookupAllIndexWords
, so all IndexWordSets with the same lemma should be equal.getIndexWord
(POS p) Get the IndexWord associated withp
.Get an array of the IndexWords in this set.Get a collection of the IndexWords in this set.getLemma()
int
getSenseCount
(POS pos) Find out how many senses the word with part-of-speechpos
has.Get a set of all the parts-of-speech for which there is an IndexWord in this set.boolean
isValidPOS
(POS pos) Return true if there is a word with part-of-speechpos
in this set.void
Remove the IndexWord associated withp
from this set.int
size()
Get the number of IndexWords in this settoString()
-
Field Details
-
_indexWords
Map of IndexWords in this set. -
_lemma
-
_cachedToString
-
-
Constructor Details
-
IndexWordSet
-
-
Method Details
-
add
Add an IndexWord to this set -
remove
Remove the IndexWord associated withp
from this set. -
size
public int size()Get the number of IndexWords in this set -
getIndexWord
Get the IndexWord associated withp
. -
getIndexWordArray
Get an array of the IndexWords in this set. -
getIndexWordCollection
Get a collection of the IndexWords in this set. -
getValidPOSSet
Get a set of all the parts-of-speech for which there is an IndexWord in this set. -
isValidPOS
Return true if there is a word with part-of-speechpos
in this set. -
getSenseCount
Find out how many senses the word with part-of-speechpos
has. -
toString
-
getLemma
-
equals
It is assumed that IndexWordSets will only be created by callingDictionary.lookupAllIndexWords
, so all IndexWordSets with the same lemma should be equal.
-