Ejemplo n.º 1
0
 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 
Ejemplo n.º 2
0
 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
Ejemplo n.º 3
0
 def dynamic_program(self, discourse_model, c):
     return hyper.build_hypergraph(discourse_model, c)