GrammarTest: outline chi-squared test (wow this is complicated)