Jet.Lex
Class LexicalEntry

java.lang.Object
  extended byJet.Lex.LexicalEntry

public class LexicalEntry
extends java.lang.Object

the basic element of the (internal) lexicon: the set of definitions of a word or sequence of words.


Constructor Summary
LexicalEntry(java.lang.String[] wds, FeatureSet fs)
          creates a lexical entry for the sequence of words wds and makes fs one definition of this sequence.
 
Method Summary
 void addDefinition(FeatureSet fs)
          adds fs as an additional definition for this lexical entry
 FeatureSet[] getDefinition()
          returns the definitions for the lexical entry
 int matches(Document doc, int posn)
          determines whether the lexical entry matches the tokens in Document doc, starting at position posn.
 boolean matches(java.lang.String[] wds)
          determines whether the lexical entry matches the sequence of tokens wds.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LexicalEntry

public LexicalEntry(java.lang.String[] wds,
                    FeatureSet fs)
creates a lexical entry for the sequence of words wds and makes fs one definition of this sequence.

Method Detail

addDefinition

public void addDefinition(FeatureSet fs)
adds fs as an additional definition for this lexical entry


getDefinition

public FeatureSet[] getDefinition()
returns the definitions for the lexical entry


matches

public boolean matches(java.lang.String[] wds)
determines whether the lexical entry matches the sequence of tokens wds. Returns true if it does, otherwise false.


matches

public int matches(Document doc,
                   int posn)
determines whether the lexical entry matches the tokens in Document doc, starting at position posn. If it does, it returns the end position of the last token matched; otherwise it returns 0. If a token is marked case=forcedCap, a case-independent comparison is done between the entry and the token; otherwise the comparison is case-sensitive.