Package jazzparser :: Package parsers :: Package base :: Module utils :: Class SpanCombiner
[hide private]
[frames] | no frames]

Class SpanCombiner

source code

object --+
         |
        SpanCombiner

For various purposes, we want to combine adjacent identical spanning edges into one before adding them to the chart. This class makes it easy to keep track of what additional edges should be added when a new edges is added to do this.

Use this by adding edges to this combiner in the order they'd get added to the main chart (from the lexicon). combine_edge returns the additional spans that should be added along with this edge (with the same category). We assume that those additional edges were added - they get added to the combiner for future reference.

Instance Methods [hide private]
 
__init__(self)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
add_edge(self, edge, properties=None) source code
 
combine_edge(self, edge, properties=None, prop_combiner=<function <lambda> at 0x496fb90>) source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)