nltk.evaluate_sents()
¶
-
nltk.
evaluate_sents
(inputs, grammar, model, assignment, trace=0)[source]¶ Add the truth-in-a-model value to each semantic representation for each syntactic parse of each input sentences.
Parameters: - inputs (list(str)) – a list of sentences
- grammar (nltk.grammar.FeatureGrammar) –
FeatureGrammar
or name of feature-based grammar
Returns: a mapping from sentences to lists of triples (parse-tree, semantic-representations, evaluation-in-model)
Return type: list(list(tuple(nltk.tree.Tree, nltk.sem.logic.ConstantExpression, bool or dict(str): bool)))