|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.stanford.nlp.parser.oldparser.ChartParser
ChartParser. This is my haiku about this parser: Chart parser of mine, Experimental but fast, Please parse correctly. That pretty much sums it up.
Field Summary | |
static boolean |
ALL_PARSES
Keep all parses for a sentence in the chart |
static boolean |
BEST_ONLY
Keep only best edges over a span in a chart, based on edge score |
static int |
BOTTOM_UP
Argument to constructor: parse bottom up |
static boolean |
EMPTIES_OFF
Do not place empty nodes in the chart |
static boolean |
EMPTIES_ON
Place an empty ( edu.stanford.nlp.trees.Word.EMPTY at
each chart vertex, so that rules with empties on the RHS will parse. |
static boolean |
SCANNER_OFF
Argument to constructor: place all words into chart on initialization |
static boolean |
SCANNER_ON
Argument to constructor: scan (shift) words one at a time, as in the original Earley algorithm |
static boolean |
STATISTICS_OFF
Do not record statistics on Agenda operations |
static boolean |
STATISTICS_ON
Record some statistics on Agenda operations |
static int |
TOP_DOWN
Argument to constructor: parse top down |
Constructor Summary | |
ChartParser(DFSAGrammar grammar,
Lexicon lexicon,
int direction,
boolean scanMode,
boolean statistics,
boolean bestOnly)
Builds a parser for a grammar and lexicon. |
|
ChartParser(DFSAGrammar grammar,
Lexicon lexicon,
int direction,
boolean scanMode,
boolean statistics,
boolean bestOnly,
boolean empties)
Builds a parser for a grammar and lexicon. |
Method Summary | |
void |
analyzeChartRelaxation()
|
void |
analyzeChartSaturation()
|
void |
dumpChart()
|
List |
getAllParses(Label label)
|
List |
getAllParses(LabeledConstituent c)
|
Tree |
getBestParse(Label label)
|
Tree |
getBestParse(LabeledConstituent c)
|
long |
getNumEdges()
|
long |
getNumEdgesAtGoal()
|
long |
getNumTraversals()
|
long |
getNumTraversalsAtGoal()
|
void |
parse(Sentence s,
Label goal)
The basic call for parsing a sentence once the chart structure has been created. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int BOTTOM_UP
public static final int TOP_DOWN
public static final boolean SCANNER_ON
public static final boolean SCANNER_OFF
public static final boolean EMPTIES_ON
edu.stanford.nlp.trees.Word.EMPTY
at
each chart vertex, so that rules with empties on the RHS will parse.
public static final boolean EMPTIES_OFF
public static final boolean STATISTICS_ON
public static final boolean STATISTICS_OFF
public static final boolean ALL_PARSES
public static final boolean BEST_ONLY
Constructor Detail |
public ChartParser(DFSAGrammar grammar, Lexicon lexicon, int direction, boolean scanMode, boolean statistics, boolean bestOnly)
public ChartParser(DFSAGrammar grammar, Lexicon lexicon, int direction, boolean scanMode, boolean statistics, boolean bestOnly, boolean empties)
Method Detail |
public Tree getBestParse(Label label)
public Tree getBestParse(LabeledConstituent c)
public List getAllParses(Label label)
public List getAllParses(LabeledConstituent c)
public long getNumEdges()
public long getNumTraversals()
public long getNumEdgesAtGoal()
public long getNumTraversalsAtGoal()
public void parse(Sentence s, Label goal)
s
- The sentence to be parsedgoal
- The Label
of the goalpublic void analyzeChartSaturation()
public void analyzeChartRelaxation()
public void dumpChart()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |