public class Synset extends PointerTarget implements DictionaryElement
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 Net in WordNet. getTargets
retrieves the targets of these links, and getPointers
retrieves the pointers themselves.
| Modifier and Type | Field and Description |
|---|---|
protected net.sf.extjwnl.data.Synset.PointerList |
pointers |
protected POS |
pos |
dictionary| Constructor and Description |
|---|
Synset(Dictionary dictionary,
POS pos) |
Synset(Dictionary dictionary,
POS pos,
long offset) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsWord(java.lang.String lemma)
Returns true if lemma is one of the words contained in this synset.
|
boolean |
equals(java.lang.Object object)
Two Synsets are equal if their POS's and offsets are equal.
|
java.lang.String |
getGloss() |
int |
getIndex() |
java.lang.Object |
getKey()
Returns a key that can be used to index this element.
|
java.lang.String |
getLexFileName()
Returns the lexicographer file name.
|
long |
getLexFileNum()
Returns the lexicographer file name containing this synset.
|
long |
getOffset() |
java.util.List<Pointer> |
getPointers()
Returns a list of Target's pointers.
|
POS |
getPOS()
Returns element's part of speech.
|
Synset |
getSynset() |
DictionaryElementType |
getType()
Returns the element's type.
|
java.util.BitSet |
getVerbFrameFlags() |
int[] |
getVerbFrameIndices() |
java.lang.String[] |
getVerbFrames()
Returns all Verb Frames that are valid for all the words in this synset.
|
java.util.List<Word> |
getWords() |
int |
hashCode() |
int |
indexOfWord(java.lang.String lemma)
Returns the index of the word which has the lemma or -1 if not found.
|
boolean |
isAdjectiveCluster() |
void |
setDictionary(Dictionary dictionary)
Sets the dictionary this object belongs to.
|
void |
setGloss(java.lang.String gloss) |
void |
setIsAdjectiveCluster(boolean isAdjectiveCluster) |
void |
setLexFileNum(long lexFileNum)
Sets the lexicographer file name containing this synset.
|
void |
setOffset(long offset) |
void |
setVerbFrameFlags(java.util.BitSet verbFrameFlags) |
java.lang.String |
toString() |
getDictionary, getPointers, getTargets, getTargetsclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetDictionaryprotected final POS pos
protected final net.sf.extjwnl.data.Synset.PointerList pointers
public Synset(Dictionary dictionary, POS pos) throws JWNLException
JWNLExceptionpublic Synset(Dictionary dictionary, POS pos, long offset) throws JWNLException
JWNLExceptionpublic DictionaryElementType getType()
DictionaryElementgetType in interface DictionaryElementpublic java.lang.Object getKey()
DictionaryElementgetKey in interface DictionaryElementpublic POS getPOS()
DictionaryElementgetPOS in interface DictionaryElementgetPOS in class PointerTargetpublic boolean equals(java.lang.Object object)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class PointerTargetpublic Synset getSynset()
getSynset in class PointerTargetpublic int getIndex()
getIndex in class PointerTargetpublic java.util.List<Pointer> getPointers()
PointerTargetgetPointers in class PointerTargetpublic java.lang.String getGloss()
public void setGloss(java.lang.String gloss)
public java.util.List<Word> getWords()
public long getOffset()
public void setOffset(long offset)
throws JWNLException
JWNLExceptionpublic boolean isAdjectiveCluster()
public void setIsAdjectiveCluster(boolean isAdjectiveCluster)
public java.lang.String[] getVerbFrames()
public java.util.BitSet getVerbFrameFlags()
public void setVerbFrameFlags(java.util.BitSet verbFrameFlags)
public int[] getVerbFrameIndices()
public boolean containsWord(java.lang.String lemma)
lemma - lemma to checkpublic int indexOfWord(java.lang.String lemma)
lemma - lemma to checkpublic long getLexFileNum()
public void setLexFileNum(long lexFileNum)
lexFileNum - - the lexicographer file name numberpublic java.lang.String getLexFileName()
public void setDictionary(Dictionary dictionary) throws JWNLException
OwnedsetDictionary in interface OwnedsetDictionary in class PointerTargetdictionary - the dictionary this object belongs toJWNLException - JWNLException