__init__(self,
grammar,
lexicon,
trace=0)
(Constructor)
Create a new Earley chart parser, that uses grammar to
parse texts.
-
- Parameters:
grammar -
The grammar used to parse texts.
(type=cfg.Grammar )
lexicon -
A lexicon of words that records the parts of speech that each
word can have. Each key is a word, and the corresponding value is
a list of parts of speech.
(type=dict from string to
(list of string ))
trace -
The level of tracing that should be used when parsing a text.
0 will generate no tracing output; and higher
numbers will produce more verbose tracing output.
(type=int )
- Overrides:
nltk_lite.parse.chart.EarleyChartParse.__init__ (inherited documentation)
|