Class Synset
java.lang.Object
net.didion.jwnl.data.PointerTarget
net.didion.jwnl.data.Synset
- All Implemented Interfaces:
Serializable, DictionaryElement
- Direct Known Subclasses:
SynsetProxy
A
Synset, or synonym set, represents a
line of a WordNet pos.data file. A Synset
represents a concept, and contains a set of Words, each of
which has a sense that names that concept (and each of which is therefore
synonymous with the other words in the Synset).
Synset's are linked by Pointers into a network of related
concepts; this is the getTargets
retrieves the targets of these links, and getPointers
retrieves the pointers themselves.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Stringprotected StringThe text (definition, usage examples) associated with the synset.protected booleanfor use only with WordNet 1.6 and earlierprotected longThe offset of this synset in the data file.protected Pointer[]protected POSprotected BitSetprotected Word[]The words in this synset.protected StringThe proper name for the lexicographer file (noun.plant, etc)protected longThe lexicographer file name id.(package private) static final long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancontainsWord(String lemma) Returns true iflemmais one of the words contained in this synset.booleanTwo Synsets are equal if their POS's and offsets are equalgetGloss()getKey()Get a key that can be used to index this element.Gets the lex file name.longGets the lexicographer file name containing this synset.longPointer[]Return a list of Target's pointersgetPOS()Return this target's POSgetSenseKey(String lemma) Gets the sense key of a lemma.getType()Get the element's type.int[]String[]Returns all Verb Frames that are valid for all the words in this synsetgetWord(int index) Word[]getWords()intinthashCode()booleanprivate voidvoidsetLexFileNum(long lexFileId) Sets the lexicographer file name containing this synset.toString()Methods inherited from class PointerTarget
getPointers, getTargets, getTargets
-
Field Details
-
serialVersionUID
static final long serialVersionUID- See Also:
-
_pos
-
_pointers
-
_offset
protected long _offsetThe offset of this synset in the data file. -
_words
The words in this synset. -
_gloss
The text (definition, usage examples) associated with the synset. -
_verbFrameFlags
-
_isAdjectiveCluster
protected boolean _isAdjectiveClusterfor use only with WordNet 1.6 and earlier -
lexFileNum
protected long lexFileNumThe lexicographer file name id. -
lexFileName
The proper name for the lexicographer file (noun.plant, etc) -
_cachedToString
-
-
Constructor Details
-
Synset
-
Synset
-
-
Method Details
-
getType
Description copied from interface:DictionaryElementGet the element's type.- Specified by:
getTypein interfaceDictionaryElement
-
equals
Two Synsets are equal if their POS's and offsets are equal- Overrides:
equalsin classPointerTarget
-
hashCode
-
toString
- Specified by:
toStringin classPointerTarget
-
getPOS
Description copied from class:PointerTargetReturn this target's POS- Specified by:
getPOSin classPointerTarget
-
getPointers
Description copied from class:PointerTargetReturn a list of Target's pointers- Specified by:
getPointersin classPointerTarget
-
getGloss
-
getWords
-
getWordsSize
public int getWordsSize() -
getWord
-
getOffset
public long getOffset() -
getKey
Description copied from interface:DictionaryElementGet a key that can be used to index this element.- Specified by:
getKeyin interfaceDictionaryElement
-
isAdjectiveCluster
public boolean isAdjectiveCluster() -
getVerbFrames
Returns all Verb Frames that are valid for all the words in this synset -
getVerbFrameFlags
-
getVerbFrameIndicies
public int[] getVerbFrameIndicies() -
containsWord
Returns true iflemmais one of the words contained in this synset. -
readObject
- Throws:
IOExceptionClassNotFoundException
-
getLexFileNum
public long getLexFileNum()Gets the lexicographer file name containing this synset.- Returns:
- two digit decimal integer
-
setLexFileNum
public void setLexFileNum(long lexFileId) Sets the lexicographer file name containing this synset.- Parameters:
lexFileId- - the lexicographer file name id
-
getLexFileName
-
getSenseKey
-