|
|
__init__(self,
grammar,
strategy=None,
trace=0)
Create a new chart parser, that uses grammar to parse
texts. |
source code
|
|
|
|
initialize(self,
tokens)
Begin parsing the given tokens. |
source code
|
|
|
|
step(self)
Returns:
A generator that adds edges to the chart, one at a time. |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
parses(self,
tree_class=<class 'nltk_lite.parse.tree.Tree'>)
Returns:
The parse trees currently contained in the chart. |
source code
|
|
|
|
set_strategy(self,
strategy)
Change the startegy that the parser uses to decide which edges to add
to the chart. |
source code
|
|
|
|
set_grammar(self,
grammar)
Change the grammar used by the parser. |
source code
|
|
|
|
set_chart(self,
chart)
Load a given chart into the chart parser. |
source code
|
|
list of Tree
|
get_parse_list(self,
token,
tree_class=<class 'nltk_lite.parse.tree.Tree'>)
Returns:
A list of the parse trees for the sentence. |
source code
|
|
|
Inherited from __init__.AbstractParse:
batch_test,
get_parse,
parse
Inherited from __init__.ParseI:
get_parse_dict,
get_parse_probs
Inherited from object:
__delattr__,
__getattribute__,
__hash__,
__new__,
__reduce__,
__reduce_ex__,
__repr__,
__setattr__,
__str__
|