|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ISenseKey
A sense key is a unique string that identifies a Wordnet word (an
IWord). The canonical string representation is:
lemma%ss_type:lex_filenum:lex_id:head_word:head_idTo transform a
String representation of a sense key into an actual
sense key, use the SenseKeyParser class.
| Method Summary | |
|---|---|
int |
getHeadID()
Returns the head id for this sense key. |
java.lang.String |
getHeadWord()
Returns the head word for this sense key. |
java.lang.String |
getLemma()
The lemma (root form) of the word indicated by this key. |
ILexFile |
getLexicalFile()
Returns the lexical file associated with this sense key. |
int |
getLexicalID()
Returns the lexical id for this sense key, which is a non-negative integer. |
int |
getSynsetType()
Returns the synset type for the key. |
boolean |
isAdjectiveSatellite()
Returns true if this sense key points to an adjective
satellite; false otherwise. |
boolean |
needsHeadSet()
This method will always return false if the
isAdjectiveSatellite() returns false. |
void |
setHead(java.lang.String headLemma,
int headLexID)
This method is used to set the head for sense keys for adjective satellites, and it can only be called once, directly after the relevant word is created. |
| Methods inherited from interface edu.mit.jwi.item.IHasPOS |
|---|
getPOS |
| Methods inherited from interface java.lang.Comparable |
|---|
compareTo |
| Method Detail |
|---|
java.lang.String getLemma()
null, empty, or all whitespace.
int getSynsetType()
1=NOUN 2=VERB 3=ADJECTIVE 4=ADVERB 5=ADJECTIVE SATELLITE
boolean isAdjectiveSatellite()
true if this sense key points to an adjective
satellite; false otherwise.
true if this sense key points to an adjective
satellite; false otherwiseILexFile getLexicalFile()
null. If the lexical file is unknown, an
appropriate object to return is an UnknownLexFile object obtained
via the LexFile.getLexicalFile(int) method.
int getLexicalID()
java.lang.String getHeadWord()
null. If non-
null, the head word will be neither empty or nor all
whitespace.
null if the indicated sense is not an adjective
satelliteint getHeadID()
-1.
-1 if the indicated sense is not an adjective
satellite
void setHead(java.lang.String headLemma,
int headLexID)
headLemma - the head lemma to be setheadLexID -
java.lang.IllegalStateException - if this method has already been called, if the headLemma is
empty or all whitespace or if the headLexID is illegal.
java.lang.NullPointerException - if the headLemma is nullboolean needsHeadSet()
false if the
isAdjectiveSatellite() returns false. If that
method returns true, this method will only return
true if setHead(String, int) has not yet been
called.
true if the head lemma and lexical id need to be
set; false otherwise.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||