public void TestUnitProductions01() {
var productions = new List<Production> {
CFGParser.Production(@"<S> -> <A> [3]"),
CFGParser.Production(@"<S> -> <B> [1]"),
CFGParser.Production(@"<A> -> 'a'"),
CFGParser.Production(@"<B> -> 'b'"),
};
Grammar g = new Grammar(productions, Nonterminal.Of("S"));
CNFGrammar h = g.ToCNF();
Helpers.AssertNear(0.0, h.Cyk(Sentence.FromLetters("")));
Helpers.AssertNear(0.75, h.Cyk(Sentence.FromLetters("a")));
Helpers.AssertNear(0.25, h.Cyk(Sentence.FromLetters("b")));
}