From 0aedd7b2181c507db489ff2a6ec0511df06f8144 Mon Sep 17 00:00:00 2001 From: "jordi.saludes" Date: Thu, 10 Jun 2010 14:54:18 +0000 Subject: Created py-bindings. --- contrib/py-bindings/script.py | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 contrib/py-bindings/script.py (limited to 'contrib/py-bindings/script.py') 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) -- cgit v1.2.3