Probabilistic Context-Free Grammars
In formal language theory, formal grammar (phrase-structure grammar) is developed to capture the generative process of languages (Hopcroft & Ullman, 1979). A formal grammar is a set of productions (rewriting rules) that are used to generate a set of strings, that is, a language. The productions are applied iteratively to generate a string, a process called derivation. The simplest kind of formal grammar is a regular grammar.
Context-free grammars (CFG) form a more powerful class of formal grammars than regular grammars and are often used to define the syntax of programming languages. Formally, a CFG consists of a set of nonterminal symbols N, a terminal alphabet Σ, a set P of productions (rewriting rules), and a special nonterminal S called the start symbol. For a nonempty set X of symbols, let X* denote the set of all finite strings of symbols in X. Every CFG production has the form S → α, where S ∈ N and α ∈ (N ∪Σ)*. That is, the left-hand side consists of...