Class IndexWordSet
java.lang.Object
net.didion.jwnl.data.IndexWordSet
A class to simplify the access to a set of
IndexWords, 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 TypeMethodDescriptionvoidAdd an IndexWord to this setbooleanIt 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()intgetSenseCount(POS pos) Find out how many senses the word with part-of-speechposhas.Get a set of all the parts-of-speech for which there is an IndexWord in this set.booleanisValidPOS(POS pos) Return true if there is a word with part-of-speechposin this set.voidRemove the IndexWord associated withpfrom this set.intsize()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 withpfrom this set. -
size
public int size()Get the number of IndexWords in this set -
getIndexWord
-
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-speechposin this set. -
getSenseCount
Find out how many senses the word with part-of-speechposhas. -
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.
-