|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.brandeis.cs.steele.wn.Synset
public class Synset
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.
Pointer.getTarget()
retrieves the targets of these links, and
parsePointer
retrieves the pointers themselves.
Word
,
Pointer
Field Summary | |
---|---|
protected FileBackedDictionary |
dictionary
|
protected java.lang.String |
gloss
|
protected boolean |
isAdjectiveCluster
|
protected long |
offset
|
protected Pointer[] |
pointers
|
protected POS |
pos
|
protected Word[] |
words
|
Constructor Summary | |
---|---|
Synset(FileBackedDictionary dictionary)
|
Method Summary | |
---|---|
protected static PointerTarget[] |
collectTargets(Pointer[] pointers)
|
protected static java.util.List<PointerTarget> |
collectTargetsList(java.util.List<Pointer> pointersIn)
|
boolean |
equals(java.lang.Object object)
|
java.lang.String |
getDescription()
Return a description of the target. |
java.lang.String |
getGloss()
|
java.lang.String |
getLongDescription()
Return the long description of the target. |
Pointer[] |
getPointers()
Return the outgoing Pointer s from the target -- those Pointer s
that have this object as their source. |
Pointer[] |
getPointers(PointerType type)
Return the outgoing Pointer s of type type. |
java.util.List<Pointer> |
getPointersList()
Return the outgoing Pointer s from the target -- those Pointer s
that have this object as their source. |
java.util.List<Pointer> |
getPointersList(PointerType type)
Return the outgoing Pointer s of type type. |
POS |
getPOS()
|
PointerTarget[] |
getTargets()
Return the targets of the outgoing Pointer s. |
PointerTarget[] |
getTargets(PointerType type)
Return the targets of the outgoing Pointer s that have type type. |
java.util.List<PointerTarget> |
getTargetsList()
Return the targets of the outgoing Pointer s. |
java.util.List<PointerTarget> |
getTargetsList(PointerType type)
Return the targets of the outgoing Pointer s that have type type. |
Word |
getWord(int index)
|
Word[] |
getWords()
|
int |
hashCode()
|
(package private) Synset |
initializeFrom(java.lang.String line)
|
(package private) static Synset |
parseSynset(FileBackedDictionary dictionary,
java.lang.String line)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected FileBackedDictionary dictionary
protected POS pos
protected long offset
protected boolean isAdjectiveCluster
protected Word[] words
protected Pointer[] pointers
protected java.lang.String gloss
Constructor Detail |
---|
Synset(FileBackedDictionary dictionary)
Method Detail |
---|
Synset initializeFrom(java.lang.String line)
static Synset parseSynset(FileBackedDictionary dictionary, java.lang.String line)
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 java.lang.Object
public POS getPOS()
getPOS
in interface PointerTarget
public java.lang.String getGloss()
public Word[] getWords()
public Word getWord(int index)
public java.lang.String getDescription()
PointerTarget
Word
, this is it's lemma;
for a Synset
, it's the concatenated lemma's of its Word
s.
getDescription
in interface PointerTarget
public java.lang.String getLongDescription()
PointerTarget
getLongDescription
in interface PointerTarget
protected static java.util.List<PointerTarget> collectTargetsList(java.util.List<Pointer> pointersIn)
public java.util.List<PointerTarget> getTargetsList()
PointerTarget
Pointer
s.
getTargetsList
in interface PointerTarget
public java.util.List<PointerTarget> getTargetsList(PointerType type)
PointerTarget
Pointer
s that have type type.
getTargetsList
in interface PointerTarget
public java.util.List<Pointer> getPointersList()
PointerTarget
Pointer
s from the target -- those Pointer
s
that have this object as their source.
getPointersList
in interface PointerTarget
public java.util.List<Pointer> getPointersList(PointerType type)
PointerTarget
Pointer
s of type type.
getPointersList
in interface PointerTarget
protected static PointerTarget[] collectTargets(Pointer[] pointers)
public Pointer[] getPointers()
PointerTarget
Pointer
s from the target -- those Pointer
s
that have this object as their source.
getPointers
in interface PointerTarget
public Pointer[] getPointers(PointerType type)
PointerTarget
Pointer
s of type type.
getPointers
in interface PointerTarget
public PointerTarget[] getTargets()
PointerTarget
Pointer
s.
getTargets
in interface PointerTarget
public PointerTarget[] getTargets(PointerType type)
PointerTarget
Pointer
s that have type type.
getTargets
in interface PointerTarget
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |