mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-08 18:52:50 -06:00
Created py-bindings.
This commit is contained in:
9
contrib/py-bindings/script.py
Normal file
9
contrib/py-bindings/script.py
Normal file
@@ -0,0 +1,9 @@
|
||||
#!/usr/bin/env python
|
||||
from gf import *
|
||||
query = read_pgf("Query.pgf")
|
||||
lang = read_lang('QueryEng')
|
||||
cat = startcat(query)
|
||||
lexed = "is 2 prime"
|
||||
print "Parsing '%s':" % lexed
|
||||
for e in parse(query, lang, cat, lexed):
|
||||
print '\t',show_expr(e)
|
||||
Reference in New Issue
Block a user