Probabilistic context-free grammar (source code)

= Probabilistic context-free grammar
{wiki=Probabilistic_context-free_grammar}

A **Probabilistic Context-Free Grammar (PCFG)** is an extension of a context-free grammar (CFG) that associates probabilities with its production rules. In a standard CFG, each production rule defines how a non-terminal symbol can be replaced with a sequence of non-terminal and terminal symbols. In a PCFG, each production has an associated probability that reflects the likelihood of that production being applied in the parsing process.