|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.mit.jverbnet.data.WordnetKey
public class WordnetKey
Default implementation of the IWordnetType
interface.
Field Summary | |
---|---|
static java.util.regex.Pattern |
regex
Regular expression pattern for matching a wordnet key string. |
Constructor Summary | |
---|---|
WordnetKey(java.lang.String lemma,
int ssType,
int lexFileNum,
int lexID)
Constructs a new wordnet type (a.k.a., sense key). |
Method Summary | |
---|---|
int |
compareTo(IWordnetKey key)
|
boolean |
equals(java.lang.Object obj)
|
java.lang.String |
getLemma()
The lemma (root form) of the word indicated by wordnet type. |
int |
getLexicalFileNumber()
Returns the lexical file number associated with this wordnet type. |
int |
getLexicalID()
Returns the lexical id for this sense key, which is a non-negative integer. |
int |
getSynsetType()
Returns the synset number for the type, which will usually be 2 for all verbnet types. |
int |
hashCode()
|
static int |
hashCode(IWordnetKey key)
Calculates a hash code for a wordnet type object. |
static WordnetKey |
parseKey(java.lang.String key)
Parses a string into a Wordnet type object. |
java.lang.String |
toString()
|
static java.lang.String |
toString(IWordnetKey key)
Returns a a string representation of the specified sense key object. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.util.regex.Pattern regex
Constructor Detail |
---|
public WordnetKey(java.lang.String lemma, int ssType, int lexFileNum, int lexID)
lemma
- the lemma for the sense keylexFileNum
- the lexical file number of the sense key. Must be between 0
and 99, inclusive, according to the Wordnet documentation.lexID
- the lexical id of the sense key. Must be between 0 and 15,
inclusive, according to the Wordnet documentation.Method Detail |
---|
public java.lang.String getLemma()
IWordnetKey
null
, empty, or all whitespace.
getLemma
in interface IWordnetKey
public int getSynsetType()
IWordnetKey
1=NOUN 2=VERB 3=ADJECTIVE 4=ADVERB 5=ADJECTIVE SATELLITE
getSynsetType
in interface IWordnetKey
public int getLexicalFileNumber()
IWordnetKey
getLexicalFileNumber
in interface IWordnetKey
public int getLexicalID()
IWordnetKey
getLexicalID
in interface IWordnetKey
public int compareTo(IWordnetKey key)
compareTo
in interface java.lang.Comparable<IWordnetKey>
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public static int hashCode(IWordnetKey key)
key
- the wordnet type for which to calculate a hash code
public static java.lang.String toString(IWordnetKey key)
key
- the sense key to be encoded as a string
java.lang.NullPointerException
- if the specified key is null
public static WordnetKey parseKey(java.lang.String key)
key
- the string to be transformed into a Wordnet type object
java.lang.IllegalArgumentException
- if the string is not a properly formatted Wordnet type
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |