public class Word extends PointerTarget
Word represents the lexical information related to a specific sense of an IndexWord.
Word's are linked by Pointers into a network of lexically related words.
getTargets retrieves the targets of these links, and
getPointers retrieves the pointers themselves.dictionary| Constructor and Description |
|---|
Word(Dictionary dictionary,
Synset synset,
java.lang.String lemma)
Constructs a word tied to a synset, it's position within the synset, and the lemma.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object object)
Two words are equal if their parent Synsets are equal and they have the same lemma
|
int |
getIndex()
Returns the number of this word (1-based) or 0 if not found.
|
java.lang.String |
getLemma()
Returns the lemma of this word.
|
int |
getLexId()
Returns the lexicographer id that identifies this lemma
|
java.util.List<Pointer> |
getPointers()
Returns all the pointers of the synset that contains this word whose source is this word.
|
POS |
getPOS()
Returns the part of speech of this word.
|
java.lang.String |
getSenseKey()
Returns the sense key of a lemma.
|
java.lang.String |
getSenseKeyWithAdjClass()
Returns the sense key of a lemma, taking into account adjective class (position).
|
int |
getSenseNumber()
Returns sense number of this word (1-based) or 0 if not found.
|
Synset |
getSynset()
Returns the synset associated with this word.
|
protected int |
getSynsetType() |
int |
getUseCount()
Returns the number of times each tagged sense occurs in a semantic concordance.
|
int |
hashCode() |
void |
setLexId(int lexId)
Sets the lexicographer id that identifies this lemma.
|
void |
setUseCount(int useCount)
Sets the number of times each tagged sense occurs in a semantic concordance.
|
protected java.lang.StringBuilder |
startBuildingSenseKey(int ss_type) |
java.lang.String |
toString() |
getDictionary, getPointers, getTargets, getTargets, setDictionarypublic Word(Dictionary dictionary, Synset synset, java.lang.String lemma)
dictionary - ownersynset - the synset this word is contained inlemma - the lemma of this wordpublic boolean equals(java.lang.Object object)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class PointerTargetpublic int getLexId()
public void setLexId(int lexId)
lexId - the lexicographer id that identifies this lemmapublic Synset getSynset()
getSynset in class PointerTargetpublic POS getPOS()
getPOS in class PointerTargetpublic int getIndex()
getIndex in class PointerTargetpublic java.lang.String getLemma()
public int getUseCount()
public void setUseCount(int useCount)
useCount - number of times each tagged sense occurs in a semantic concordancepublic java.util.List<Pointer> getPointers()
getPointers in class PointerTargetpublic java.lang.String getSenseKey()
throws JWNLException
JWNLException - JWNLExceptionpublic java.lang.String getSenseKeyWithAdjClass()
throws JWNLException
JWNLException - JWNLExceptionpublic int getSenseNumber()
throws JWNLException
JWNLException - JWNLExceptionprotected int getSynsetType()
protected java.lang.StringBuilder startBuildingSenseKey(int ss_type)