public void TestToCNF04() {
var productions = new HashSet<Production> {
CFGParser.Production("<A> -> <A> <B>"),
CFGParser.Production("<A> -> ε"),
CFGParser.Production("<B> -> 'b'"),
CFGParser.Production("<B> -> ε"),
};
Grammar g = new Grammar(productions, Nonterminal.Of("A"));
CNFGrammar h = g.ToCNF();
var third = 1.0 / 3.0;
Helpers.AssertNear(0.5 + third * 0.5, h.Cyk(Sentence.FromLetters("")));
Helpers.AssertNear(third * 2.0 / 3.0, h.Cyk(Sentence.FromLetters("b")));
}