|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.didion.jwnl.data.PointerTarget
net.didion.jwnl.data.Word
public class Word
A Word
represents the lexical information related to a specific sense of an IndexWord
.
Word
's are linked by Pointer
s into a network of lexically related words.
getTargets
retrieves the targets of these links, and
getPointers
retrieves the pointers themselves.
Constructor Summary | |
---|---|
Word(java.lang.String lemma,
java.lang.String senseKey,
int usageCnt)
Proxy constructor for an unitialized word. |
|
Word(Synset synset,
int index,
java.lang.String lemma)
Constructs a word tied to a synset, it's position within the synset, and the lemma. |
|
Word(Synset synset,
int index,
java.lang.String lemma,
java.lang.String senseKey,
int usageCnt)
Creates a word with the synset, index, lemma, and senseKey. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object object)
Two words are equal if their parent Synsets are equal and they have the same index |
int |
getIndex()
Gets the index of this word. |
java.lang.String |
getLemma()
Gets the lemma of this word. |
Pointer[] |
getPointers()
returns all the pointers of the synset that contains this word whose source is this word |
POS |
getPOS()
Gets the part of speech of this word. |
java.lang.String |
getSenseKey()
Gets the sense key for this Word. |
Synset |
getSynset()
Gets the synset associated with this word. |
int |
getUsageCount()
Gets the usage if this word has been tagged within WordNet. |
int |
hashCode()
|
void |
setSenseKey(java.lang.String sk)
Sets the sense key to this word. |
void |
setUsageCount(int usageTag)
Sets the usage tag for this word. |
java.lang.String |
toString()
|
Methods inherited from class net.didion.jwnl.data.PointerTarget |
---|
getPointers, getTargets, getTargets |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Word(java.lang.String lemma, java.lang.String senseKey, int usageCnt)
lemma
- senseKey
- usageCnt
- public Word(Synset synset, int index, java.lang.String lemma)
synset
- - the synset this word is contained inindex
- - the position of the word in the synset (usage)lemma
- - the lemma of this wordpublic Word(Synset synset, int index, java.lang.String lemma, java.lang.String senseKey, int usageCnt)
synset
- the synsetindex
- the indexlemma
- the lemmasenseKey
- usageCnt
- Method Detail |
---|
public boolean equals(java.lang.Object object)
equals
in class PointerTarget
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class PointerTarget
public Synset getSynset()
public POS getPOS()
getPOS
in class PointerTarget
public int getIndex()
public java.lang.String getLemma()
public void setSenseKey(java.lang.String sk)
sk
- the sense keypublic java.lang.String getSenseKey()
public Pointer[] getPointers()
getPointers
in class PointerTarget
public int getUsageCount()
public void setUsageCount(int usageTag)
usageTag
- - usage number in tagged texts.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |