def hypergraph(self): import pydecode.chart as chart import discourse.hypergraph as hyper c = chart.ChartBuilder(semiring=chart.HypergraphSemiRing, build_hypergraph=True, strict=False) hypergraph = hyper.build_hypergraph(self, c).finish() return hypergraph
def hypergraph(self): """ Build a graph of this problem instance, using PyDecode. """ import pydecode.chart as chart import discourse.hypergraph as hyper c = chart.ChartBuilder(semiring=chart.HypergraphSemiRing, build_hypergraph=True, strict=False) hypergraph = hyper.build_hypergraph(self, c).finish() return hypergraph
def dynamic_program(self, discourse_model, c): return hyper.build_hypergraph(discourse_model, c)