diff options
| author | prasant.kolachina <prasant.kolachina@cse.gu.se> | 2015-04-26 10:16:23 +0000 |
|---|---|---|
| committer | prasant.kolachina <prasant.kolachina@cse.gu.se> | 2015-04-26 10:16:23 +0000 |
| commit | aa79f6bb280b9c03311b899af98c16a5ce3253c9 (patch) | |
| tree | 670ed8b60660bb0b633202275dd8e2b232051ae3 /src/runtime/python/examples/gf_utils.py | |
| parent | c17501540a46cdd5de1936d5357946cd835efbdd (diff) | |
Bug fix python examples
Diffstat (limited to 'src/runtime/python/examples/gf_utils.py')
| -rw-r--r-- | src/runtime/python/examples/gf_utils.py | 4 |
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); |
