'Create a new ``BottomUpProbabilisticChartParser``, that uses
``grammar`` to parse texts.
:type grammar: PCFG
:param grammar: The grammar used to parse texts.
:type beam_size: int
:param beam_size: The maximum length for the parser\'s edge queue.
:type trace: int
:param trace: The level of tracing that should be used when
parsing a text.  ``0`` will generate no tracing output;
and higher numbers will produce more verbose tracing
output.'

def __init__(self, grammar, beam_size=0, trace=0):

    if (not isinstance(grammar, PCFG)):
        raise ValueError(u'The    grammar    must    be    probabilistic    PCFG')
    self._grammar = grammar
    self.beam_size = beam_size
    self._trace = trace
