The probabilistic aspect is introduced into syntactic recognition tasks via Stochastic Context-Free Grammars. A Stochastic Context-Free Grammar (SCFG) is a probabilistic extension of a Context-Free Grammar. The extension is implemented by adding a probability measure to every production rule:
The rule probability p is usually written as
.
This probability is a conditional probability of the
production being chosen, given that non-terminal A is up for
expansion (in generative terms). Saying that stochastic grammar is
context-free essentially means that the rules are conditionally
independent and, therefore, the probability of the complete derivation
of a string is just a product of the probabilities of rules
participating in the derivation.
Given a SCFG G, let us list some basic definitions:
In particular,
.