| Trees | Indices | Help |
|
|---|
|
|
object --+
|
cky.chart.Chart --+
|
PcfgChart
Overrides the CKY chart to add probabilistic stuff.
Signs in the input should have an attribute 'probability'. The results of rule application will also have such an attribute.
|
|||
|
HASH_SET_IMPL For this chart's internal data structure, we use a modified implementation of the HashSet which adds handling of probabilities. |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
Inherited from Inherited from Inherited from |
|||
|
|||
|
ranked_parses Full parses ranked by probability. |
|||
|
Inherited from Inherited from |
|||
|
|||
x.__init__(...) initializes x; see help(type(x)) for signature
|
Full parses ranked by probability. Returns a list. |
Applies a given unary rule to particular arcs and adds the results to the chart.
|
Used by _apply_binary_rule and _apply_binary_rule_semantics to compute the expansion probabilitiy. This is a separate function because both of the above do the same to compute the probabilities, so I don't want to repeat the code. Returns a tuple of the probability and the inside probability. |
Internal method to apply a given binary rule to a given pair of signs. Note that the supported interface method is apply_binary_rule(), which applies a single rule to all sign pairs between given nodes. This is used internally by apply_binary_rule and apply_binary_rules.
|
Like _apply_binary_rule, but uses the
|
Add to the chart all signs resulting from possible applications of binary rules to pairs of signs between node pairs (start,middle) and (middle,end), producing entries in (start,end).
|
Apply a given binary rule to particular arcs in the chart. Note that this method is not used by apply_binary_rules for efficiency reasons, but apply_binary_rules simply does the same thing for all possible binary rules.
|
Applies a beam to every arc in the chart. If arc is given, it should be a tuple of (start,end): applies a beam only to the arc starting at start and ending at end. |
|
Starts up a graphical chart inspector to inspect this chart. The inspector will run in a separate thread. Subclasses of Chart should override this if they have their own version of the chart inspector and instantiate that instead.
|
|
|||
ranked_parsesFull parses ranked by probability. Returns a list.
|
| Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Mon Nov 26 16:04:57 2012 | http://epydoc.sourceforge.net |