public class Lexicon extends Object
| Constructor and Description |
|---|
Lexicon() |
| Modifier and Type | Method and Description |
|---|---|
static void |
addEntry(String[] words,
FeatureSet fs)
adds fs to the lexicon as a definition of words
|
static void |
addEntry(String[] words,
FeatureSet fs,
String type) |
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(String[] words)
removes the definition (if any) for lexical item words.
|
static FeatureSet[] |
lookUp(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.
|
public static void clear()
public static boolean clearEntry(String[] words)
public static void addEntry(String[] words, FeatureSet fs)
public static void addEntry(String[] words, FeatureSet fs, String type)
public static FeatureSet[] lookUp(String[] words)
public static int annotateWithDefinitions(Document doc, int posn)
public static void annotateWithDefinitions(Document doc, int start, int end)
Copyright © 2016 New York University. All rights reserved.