type SingleEdgeFundamentalRule
source code
object --+
|
ChartRuleI --+
|
AbstractChartRule --+
|
FundamentalRule --+
|
SingleEdgeFundamentalRule
- Known Subclasses:
-
A rule that joins a given edge with adjacent edges in the chart, to
form combined edges. In particular, this rule specifies that either of
the edges:
-
[A → α * B β][i:j]
-
[B → γ *][j:k]
licenses the edge:
if the other edge is already in the chart.
iter of EdgeI
|
apply_iter(self,
chart,
grammar,
edge)
Returns:
A generator that will add edges licensed by this rule and the given
edges to the chart, one at a time. |
source code
|
|
|
|
| _apply_complete(self,
chart,
grammar,
right_edge) |
source code
|
|
|
|
| _apply_incomplete(self,
chart,
grammar,
left_edge) |
source code
|
|
|
Inherited from AbstractChartRule:
__str__,
apply,
apply_everywhere,
apply_everywhere_iter
|
int
|
NUM_EDGES = 1
The number of existing edges that this rule uses to license new
edges.
|
- Parameters:
edges - 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 of EdgeI
- 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.
- Overrides:
ChartRuleI.apply_iter
- (inherited documentation)
|