diff options
| author | jordi.saludes <jordi.saludes@upc.edu> | 2010-06-10 14:54:18 +0000 |
|---|---|---|
| committer | jordi.saludes <jordi.saludes@upc.edu> | 2010-06-10 14:54:18 +0000 |
| commit | 0aedd7b2181c507db489ff2a6ec0511df06f8144 (patch) | |
| tree | 4cf307c8c3e5206077dca4682bb8d4981c64c791 /contrib/py-bindings/script.py | |
| parent | 4fdd21f1273e75b84e87c49b95b02e9fc149b5c0 (diff) | |
Created py-bindings.
Diffstat (limited to 'contrib/py-bindings/script.py')
| -rw-r--r-- | contrib/py-bindings/script.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/contrib/py-bindings/script.py b/contrib/py-bindings/script.py new file mode 100644 index 000000000..6148fadea --- /dev/null +++ b/contrib/py-bindings/script.py @@ -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) |
