diff options
| author | kr.angelov <kr.angelov@gmail.com> | 2012-12-14 15:32:49 +0000 |
|---|---|---|
| committer | kr.angelov <kr.angelov@gmail.com> | 2012-12-14 15:32:49 +0000 |
| commit | 20aaa4a9899ce454d3c20594a2b7d2d3d38dbc88 (patch) | |
| tree | 0f2556c655a29e08cb961b6aa56f0c6d51aa51b6 /src/runtime/python/test.py | |
| parent | 9ab3a6034d017f87bfc62ac2fc9351e514841a24 (diff) | |
The first prototype for exhaustive generation in the C runtime. The trees are always listed in decreasing probability order. There is also an API for generation from Python
Diffstat (limited to 'src/runtime/python/test.py')
| -rw-r--r-- | src/runtime/python/test.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/runtime/python/test.py b/src/runtime/python/test.py index cb0ba5452..ae0427d60 100644 --- a/src/runtime/python/test.py +++ b/src/runtime/python/test.py @@ -19,8 +19,8 @@ while True: break; try: - for e in gr.languages["ParseEng"].parse(gr.startCat,line): - print e + for (p,e) in gr.languages["ParseEng"].parse(gr.startCat,line): + sys.stdout.write("["+str(p)+"] "+str(e)+"\n") print gr.languages["ParseEngBul"].linearize(e) except pgf.ParseError as e: print e.message |
