class BottomUpPredictCombineRule(BottomUpPredictRule): (source)
Known subclasses: nltk.app.chartparser_app.BottomUpLeftCornerEdgeRule
, nltk.parse.chart.FilteredBottomUpPredictCombineRule
, nltk.parse.featurechart.FeatureBottomUpPredictCombineRule
A rule licensing any edge corresponding to a production whose right-hand side begins with a complete edge's left-hand side. In particular, this rule specifies that [A -> alpha \*] licenses the edge [B -> A \* beta] for each grammar production B -> A beta.
Note | |
This is like BottomUpPredictRule, but it also applies the FundamentalRule to the resulting edge. |
Method | apply |
Return a generator that will add edges licensed by this rule and the given edges to the chart, one at a time. Each time the generator is resumed, it will either add a new edge and yield that edge; or return. |
Constant | NUM |
Undocumented |
Inherited from AbstractChartRule
(via BottomUpPredictRule
):
Method | __str__ |
Undocumented |
Method | apply |
Return a generator that will add all edges licensed by this rule, given the edges that are currently in the chart, one at a time. Each time the generator is resumed, it will either add a new edge and yield that edge; or return. |
nltk.parse.chart.FilteredBottomUpPredictCombineRule
, nltk.parse.featurechart.FeatureBottomUpPredictCombineRule
Return a generator that will add edges licensed by this rule and the given edges to the chart, one at a time. Each time the generator is resumed, it will either add a new edge and yield that edge; or return.
Parameters | |
chart | Undocumented |
grammar | Undocumented |
edge | Undocumented |
*edges:list(EdgeI) | A set of existing edges. The number of edges that should be passed to apply() is specified by the NUM_EDGES class variable. |
Returns | |
iter(EdgeI) | Undocumented |