|
__init__(self,
grammar,
beam_size=0,
trace=0)
Create a new BottomUpChartParser , that uses
grammar to parse texts. |
source code
|
|
|
|
None
|
trace(self,
trace=2)
Set the level of tracing output that should be generated when parsing
a text. |
source code
|
|
list of Tree
|
nbest_parse(self,
tokens,
n=None)
Returns:
A list of parse trees that represent possible structures for the
given sentence. |
source code
|
|
|
|
None
|
sort_queue(self,
queue,
chart)
Sort the given queue of Edge s, placing the edge that
should be tried first at the beginning of the queue. |
source code
|
|
|
_prune(self,
queue,
chart)
Discard items in the queue if the queue is longer than the beam. |
source code
|
|
Inherited from api.ParserI :
batch_iter_parse ,
batch_nbest_parse ,
batch_parse ,
batch_prob_parse ,
iter_parse ,
parse ,
prob_parse
Inherited from object :
__delattr__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__ ,
__str__
|
Inherited from api.ParserI :
batch_test ,
get_parse ,
get_parse_dict ,
get_parse_list ,
get_parse_prob
|