| Home | Trees | Indices | Help |
|
|---|
|
|
object --+
|
Grammar --+
|
WeightedGrammar
A probabilistic context-free grammar. A Weighted Grammar consists of a start state and a set of weighted productions. The set of terminals and nonterminals is implicitly specified by the productions.
PCFG productions should be WeightedProductions.
WeightedGrammars impose the constraint that the set of
productions with any given left-hand-side must have probabilities that
sum to 1.
If you need efficient key-based access to productions, you can use a subclass to implement it.
|
|||
|
|||
|
Inherited from Inherited from |
|||
|
|||
float
|
EPSILON = 0.01The acceptable margin of error for checking that productions with a given left-hand side have probabilities that sum to 1. |
||
|
|||
|
Inherited from |
|||
|
|||
Create a new context-free grammar, from the given start state and set
of
|
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0beta1 on Wed Aug 27 15:08:51 2008 | http://epydoc.sourceforge.net |