1
0
forked from GitHub/gf-core

a bit more flexible API for parsing in Python

This commit is contained in:
kr.angelov
2012-12-14 16:00:52 +00:00
parent 8aefd1e072
commit b367dfd80f
2 changed files with 26 additions and 20 deletions

View File

@@ -19,7 +19,7 @@ while True:
break;
try:
for (p,e) in gr.languages["ParseEng"].parse(gr.startCat,line):
for (p,e) in gr.languages["ParseEng"].parse(line, n=5):
sys.stdout.write("["+str(p)+"] "+str(e)+"\n")
print gr.languages["ParseEngBul"].linearize(e)
except pgf.ParseError as e: