nltk.parse.TestGrammar.run¶
-
TestGrammar.
run
(show_trees=False)[source]¶ - Sentences in the test suite are divided into two classes:
- grammatical (
accept
) and - ungrammatical (
reject
).
- grammatical (
If a sentence should parse accordng to the grammar, the value of
trees
will be a non-empty list. If a sentence should be rejected according to the grammar, then the value oftrees
will be None.