|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--Word
Storage for a word in a lexicon. Words have the following information associated with them: the word itself, as represented in English text, and a list of all the word's varying syntactic roles and semantic interpretations.
Constructor Summary | |
Word(java.lang.String text,
Role newRole)
Creates a word, with a set pronunciation. |
Method Summary | |
void |
addAllSenses(Word other)
Adds all the senses of some other word to this word. |
void |
addRole(Role newRole)
Adds a new role to a word. |
LexItem[] |
getLexItems(int begin)
Makes a bunch of lexical items from this word, one per role. |
LexItem[] |
getLexItems(int begin,
PrologEngine engine)
Makes a bunch of lexical items from this word, one per role. |
java.lang.String |
getText()
Returns the text of this word. |
java.lang.String |
toString()
Gets this word as a string. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Word(java.lang.String text, Role newRole)
text
- the English text for the word.newRole
- the role (meaning and syntax) for the word.Method Detail |
public void addRole(Role newRole)
newRole
- the new role.public void addAllSenses(Word other)
other
- the other word.
java.lang.RuntimeException
- if not the same word.public java.lang.String getText()
public LexItem[] getLexItems(int begin, PrologEngine engine)
begin
- the beginning.engine
- the prolog engine.
public LexItem[] getLexItems(int begin)
begin
- the beginning.
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |