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 getTargets
retrieves the targets of these links, and getPointers
retrieves the pointers themselves.
Constructor and Description |
---|
Synset(POS pos,
long offset,
Word[] words,
Pointer[] pointers,
String gloss,
BitSet verbFrames) |
Synset(POS pos,
long offset,
Word[] words,
Pointer[] pointers,
String gloss,
BitSet verbFrames,
boolean isAdjectiveCluster)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
boolean |
containsWord(String lemma)
Returns true if
lemma is one of the words contained in this synset. |
boolean |
equals(Object object)
Two Synsets are equal if their POS's and offsets are equal
|
String |
getGloss() |
Object |
getKey()
Get a key that can be used to index this element.
|
long |
getLexFileId()
Gets the lexicographer file name containing this synset.
|
String |
getLexFileName()
Gets the lex file name.
|
long |
getOffset() |
Pointer[] |
getPointers()
Return a list of Target's pointers
|
POS |
getPOS()
Return this target's POS
|
DictionaryElementType |
getType()
Get the element's type.
|
BitSet |
getVerbFrameFlags() |
int[] |
getVerbFrameIndicies() |
String[] |
getVerbFrames()
Returns all Verb Frames that are valid for all the words in this synset
|
Word |
getWord(int index) |
Word[] |
getWords() |
int |
getWordsSize() |
int |
hashCode() |
boolean |
isAdjectiveCluster() |
void |
setLexFileId(long lexFileId)
Sets the lexicographer file name containing this synset.
|
String |
toString() |
getPointers, getTargets, getTargets
public Synset(POS pos, long offset, Word[] words, Pointer[] pointers, String gloss, BitSet verbFrames)
public DictionaryElementType getType()
DictionaryElement
getType
in interface DictionaryElement
public boolean equals(Object object)
equals
in class PointerTarget
public String toString()
toString
in class PointerTarget
public POS getPOS()
PointerTarget
getPOS
in class PointerTarget
public Pointer[] getPointers()
PointerTarget
getPointers
in class PointerTarget
public String getGloss()
public Word[] getWords()
public int getWordsSize()
public Word getWord(int index)
public long getOffset()
public Object getKey()
DictionaryElement
getKey
in interface DictionaryElement
public boolean isAdjectiveCluster()
public String[] getVerbFrames()
public BitSet getVerbFrameFlags()
public int[] getVerbFrameIndicies()
public boolean containsWord(String lemma)
lemma
is one of the words contained in this synset.public long getLexFileId()
public void setLexFileId(long lexFileId)
lexFileId
- - the lexicographer file name idpublic String getLexFileName()