edu.brandeis.cs.steele.wn
Class Synset
java.lang.Object
|
+--edu.brandeis.cs.steele.wn.Synset
- All Implemented Interfaces:
- PointerTarget
- public class Synset
- extends java.lang.Object
- implements PointerTarget
A 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. getTarget
retrieves the targets of these links, and
getPointer
retrieves the pointers themselves.
- See Also:
Word
,
Pointer
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
dictionary
protected FileBackedDictionary dictionary
pos
protected POS pos
offset
protected long offset
isAdjectiveCluster
protected boolean isAdjectiveCluster
words
protected Word[] words
pointers
protected Pointer[] pointers
gloss
protected java.lang.String gloss
equals
public boolean equals(java.lang.Object object)
- Overrides:
equals
in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
getPOS
public POS getPOS()
- Specified by:
getPOS
in interface PointerTarget
getGloss
public java.lang.String getGloss()
getWords
public Word[] getWords()
getWord
public Word getWord(int index)
getDescription
public java.lang.String getDescription()
- Description copied from interface:
PointerTarget
- Return a description of the target. For a
Word
, this is it's lemma;
for a Synset
, it's the concatenated lemma's of its Word
s.
- Specified by:
getDescription
in interface PointerTarget
getLongDescription
public java.lang.String getLongDescription()
- Description copied from interface:
PointerTarget
- Return the long description of the target. This is its description, appended by,
if it exists, a dash and it's gloss.
- Specified by:
getLongDescription
in interface PointerTarget
collectTargets
protected static PointerTarget[] collectTargets(Pointer[] pointers)
getPointers
public Pointer[] getPointers()
- Description copied from interface:
PointerTarget
- Return the outgoing
Pointer
s from the target -- those Pointer
s
that have this object as their source.
- Specified by:
getPointers
in interface PointerTarget
getPointers
public Pointer[] getPointers(PointerType type)
- Description copied from interface:
PointerTarget
- Return the outgoing
Pointer
s of type type.
- Specified by:
getPointers
in interface PointerTarget
getTargets
public PointerTarget[] getTargets()
- Description copied from interface:
PointerTarget
- Return the targets of the outgoing
Pointer
s.
- Specified by:
getTargets
in interface PointerTarget
getTargets
public PointerTarget[] getTargets(PointerType type)
- Description copied from interface:
PointerTarget
- Return the targets of the outgoing
Pointer
s that have type type.
- Specified by:
getTargets
in interface PointerTarget