예제 #1
0
파일: debug.py 프로젝트: kedz/discourse
 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 
예제 #2
0
파일: rush.py 프로젝트: kedz/discourse
 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
예제 #3
0
 def dynamic_program(self, discourse_model, c):
     return hyper.build_hypergraph(discourse_model, c)