public class Parsers extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
BUPARSE
a constant indicating that the bottom-up parser,
BUParse,
should be used to analyze the text |
static int |
CHARTPARSE
a constant indicating that the top-down active chart parser,
chartParse, should be used to analyze the text |
static boolean |
parserTrace
if true, causes each parser to write trace messages to the
Console.
|
static int |
parserType
determines which analyzer will be applied by method
parse |
static int |
RECOGNIZE
a constant indicating that the top-down recognizer,
recognize,
should be used to analyze the text |
static int |
TDPARSE
a constant indicating that the top-down parser,
TDParse,
should be used to analyze the text |
| Constructor and Description |
|---|
Parsers() |
| Modifier and Type | Method and Description |
|---|---|
static Vector |
BUParse(Document doc,
int posn,
int end,
Grammar gram)
apply a bottom-up ('immediate constituent') parser to characters
posn to end of Document using grammar gram.
|
static Vector |
chartParse(Document doc,
int posn,
int end,
Grammar gram)
apply a top-down active chart parser to characters
posn to end of Document doc using grammar gram.
|
static Vector |
parse(Document doc,
int posn,
int end,
Grammar gram)
parse characters posn to end of Document using
grammar gram.
|
static JMenu |
parserMenu()
returns a menu for controlling the parser (part of the Console menu
bar).
|
static boolean |
recognize(Document doc,
int posn,
int end,
Grammar gram)
apply a top-down recognizer to characters posn to end
of Document using grammar gram.
|
static Vector |
TDParse(Document doc,
int posn,
int end,
Grammar gram)
apply a top-down backtracking parser to characters posn to
end of Document using grammar gram.
|
public static final int RECOGNIZE
recognize,
should be used to analyze the textpublic static final int TDPARSE
TDParse,
should be used to analyze the textpublic static final int BUPARSE
BUParse,
should be used to analyze the textpublic static final int CHARTPARSE
chartParse, should be used to analyze the textpublic static int parserType
parsepublic static boolean parserTrace
public static Vector parse(Document doc, int posn, int end, Grammar gram)
public static boolean recognize(Document doc, int posn, int end, Grammar gram)
public static Vector TDParse(Document doc, int posn, int end, Grammar gram)
public static Vector BUParse(Document doc, int posn, int end, Grammar gram)
public static Vector chartParse(Document doc, int posn, int end, Grammar gram)
public static JMenu parserMenu()
Copyright © 2016 New York University. All rights reserved.