Jet.Lex
Class Lexicon

java.lang.Object
  extended byJet.Lex.Lexicon

public class Lexicon
extends java.lang.Object

provides (static) data structures for storing and looking up word definitions.


Constructor Summary
Lexicon()
           
 
Method Summary
static void addEntry(java.lang.String[] words, FeatureSet fs)
          adds fs to the lexicon as a definition of words
static int annotateWithDefinitions(Document doc, int posn)
          annotateWithDefinitions looks for the longest defined lexical item consisting of the tokens starting at position posn; if such an item is found, then for each definition of this item, an annotation of type constit is added to the item, with the item's definition as its attributes.
static void annotateWithDefinitions(Document doc, int start, int end)
           
static void clear()
          clears the entire lexicon (remove all entries).
static boolean clearEntry(java.lang.String[] words)
          removes the definition (if any) for lexical item words.
static FeatureSet[] lookUp(java.lang.String[] words)
          return an array of the definitions (FeatureSets) associated with the lexical item words, or null if there are no definitions associated with this lexical item.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Lexicon

public Lexicon()
Method Detail

clear

public static void clear()
clears the entire lexicon (remove all entries).


clearEntry

public static boolean clearEntry(java.lang.String[] words)
removes the definition (if any) for lexical item words.

Returns:
true if an entry is found for the item.

addEntry

public static void addEntry(java.lang.String[] words,
                            FeatureSet fs)
adds fs to the lexicon as a definition of words


lookUp

public static FeatureSet[] lookUp(java.lang.String[] words)
return an array of the definitions (FeatureSets) associated with the lexical item words, or null if there are no definitions associated with this lexical item.


annotateWithDefinitions

public static int annotateWithDefinitions(Document doc,
                                          int posn)
annotateWithDefinitions looks for the longest defined lexical item consisting of the tokens starting at position posn; if such an item is found, then for each definition of this item, an annotation of type constit is added to the item, with the item's definition as its attributes.

Returns:
the end position of this lexical item

annotateWithDefinitions

public static void annotateWithDefinitions(Document doc,
                                           int start,
                                           int end)