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 Word
s, 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 Pointer
s 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, getTargets
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getDictionary
protected final POS pos
protected final net.sf.extjwnl.data.Synset.PointerList pointers
public Synset(Dictionary dictionary, POS pos) throws JWNLException
JWNLException
public Synset(Dictionary dictionary, POS pos, long offset) throws JWNLException
JWNLException
public DictionaryElementType getType()
DictionaryElement
getType
in interface DictionaryElement
public java.lang.Object getKey()
DictionaryElement
getKey
in interface DictionaryElement
public POS getPOS()
DictionaryElement
getPOS
in interface DictionaryElement
getPOS
in class PointerTarget
public boolean equals(java.lang.Object object)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class PointerTarget
public Synset getSynset()
getSynset
in class PointerTarget
public int getIndex()
getIndex
in class PointerTarget
public java.util.List<Pointer> getPointers()
PointerTarget
getPointers
in class PointerTarget
public 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
JWNLException
public 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
Owned
setDictionary
in interface Owned
setDictionary
in class PointerTarget
dictionary
- the dictionary this object belongs toJWNLException
- JWNLException