summaryrefslogtreecommitdiff
path: root/src/runtime/python
diff options
context:
space:
mode:
authorprasant.kolachina <prasant.kolachina@cse.gu.se>2015-04-26 10:16:23 +0000
committerprasant.kolachina <prasant.kolachina@cse.gu.se>2015-04-26 10:16:23 +0000
commitaa79f6bb280b9c03311b899af98c16a5ce3253c9 (patch)
tree670ed8b60660bb0b633202275dd8e2b232051ae3 /src/runtime/python
parentc17501540a46cdd5de1936d5357946cd835efbdd (diff)
Bug fix python examples
Diffstat (limited to 'src/runtime/python')
-rw-r--r--src/runtime/python/examples/gf_utils.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/runtime/python/examples/gf_utils.py b/src/runtime/python/examples/gf_utils.py
index 0ff815e2e..3ec98b865 100644
--- a/src/runtime/python/examples/gf_utils.py
+++ b/src/runtime/python/examples/gf_utils.py
@@ -153,7 +153,7 @@ def pgf_parse(args):
grammar = pgf.readPGF(args.pgfgrammar);
import translation_pipeline;
- inputSet = translation_pipeline.web_lexer(grammar, args.srclang, lexer(args.inputstream) );
+ inputSet = translation_pipeline.web_lexer(grammar, args.srclang, args.inputstream);
outputPrinter = lambda X: "%f\t%s" %(X[0], str(X[1])); #operator.itemgetter(1);
callbacks = [('PN', translation_pipeline.parseNames(grammar, args.srclang)), ('Symb', translation_pipeline.parseUnknown(grammar, args.srclang))];
parser = getKBestParses(grammar, args.srclang, 1, callbacks);
@@ -168,7 +168,7 @@ def pgf_kparse(args):
grammar = pgf.readPGF(args.pgfgrammar);
import translation_pipeline;
- inputSet = translation_pipeline.web_lexer(grammar, args.srclang, lexer(args.inputstream) );
+ inputSet = translation_pipeline.web_lexer(grammar, args.srclang, args.inputstream);
outputPrinter = printJohnsonRerankerFormat;
callbacks = [('PN', translation_pipeline.parseNames(grammar, args.srclang)), ('Symb', translation_pipeline.parseUnknown(grammar, args.srclang))];
parser = getKBestParses(grammar, args.srclang, args.K, callbacks=callbacks);