Aufbau der Demo Grammar
Montag, November 2nd, 2015Die Demo Grammar ist wie folgt aufgebaut: from __future__ import print_function import itertools import sys from nltk.grammar import Nonterminal def generate(grammar, start=None, depth=None, n=None): „““ Generates an iterator of all sentences from a CFG. :param grammar: The Grammar used to generate sentences. :param start: The Nonterminal from which to start generate […]