Class LexItem

java.lang.Object
  |
  +--Constituent
        |
        +--LexItem
All Implemented Interfaces:
java.io.Serializable

public class LexItem
extends Constituent

A lexical item is just like a word, except that it is constrained to only one role, and can be a constituent of some sentence. This isn't really correct linguistic terminology; I'm not sure what real linguists would say to make this distinction.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class Constituent
beginPos, endPos, held, NO_PROLOG, prologName, role, WILDCARD
 
Constructor Summary
LexItem(java.lang.String newText, java.lang.String newProlog, Role newRole, int begin, boolean newHeld)
          Creates a lex item from text and a role.
LexItem(java.lang.String newText, java.lang.String newProlog, Role newRole, int begin, PrologEngine engine)
          Creates a lex item from text and a role.
 
Method Summary
 java.util.LinkedList beginningsList()
          Get a linkedlist of integers containing the beginning of this constituent.
 java.lang.String getText()
          Get the text of this LexItem.
 java.lang.String interpretation()
          Get the interpretation of this lexical item.
 
Methods inherited from class Constituent
beginning, checkHeld, end, held, inCat, length, prologName, prologName, prologStatements, syntax, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LexItem

public LexItem(java.lang.String newText,
               java.lang.String newProlog,
               Role newRole,
               int begin,
               PrologEngine engine)
Creates a lex item from text and a role.

Parameters:
newText - the word.
newProlog - the prolog name of this item.
newRole - role we want.
begin - the beginning.
engine - the prolog engine, used to decide if held or not.

LexItem

public LexItem(java.lang.String newText,
               java.lang.String newProlog,
               Role newRole,
               int begin,
               boolean newHeld)
Creates a lex item from text and a role.

Parameters:
newText - the word.
newProlog - the prolog name of this item.
newRole - role we want.
begin - the beginning.
newHeld - whether held or not.
Method Detail

getText

public java.lang.String getText()
Get the text of this LexItem.

Specified by:
getText in class Constituent
Returns:
the text.

beginningsList

public java.util.LinkedList beginningsList()
Get a linkedlist of integers containing the beginning of this constituent.

Specified by:
beginningsList in class Constituent
Returns:
a linkedlist with one element.

interpretation

public java.lang.String interpretation()
Get the interpretation of this lexical item.

Specified by:
interpretation in class Constituent
Returns:
the interpretation in prolog of this constituent.