From 93ab6c79d480703c834204f17441aef663c431e4 Mon Sep 17 00:00:00 2001 From: "prasanth.kolachina" Date: Mon, 27 Apr 2015 15:59:49 +0000 Subject: [PATCH] K translations in pipeline --- src/runtime/python/examples/translation_pipeline.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runtime/python/examples/translation_pipeline.py b/src/runtime/python/examples/translation_pipeline.py index 47b189a0a..b081c68f0 100644 --- a/src/runtime/python/examples/translation_pipeline.py +++ b/src/runtime/python/examples/translation_pipeline.py @@ -357,7 +357,7 @@ def translation_pipeline(props): else: bestTranslationIdx = 0; for tgtlang in targetLanguages: - translationBuffer[tgtlang] = gf_utils.getKLinearizations(grammar, tgtlang, [parsesBlock]).next(); + translationBuffer[tgtlang] = gf_utils.getKLinearizations(grammar, tgtlang, [parsesBlock], K=bestK).next(); if bestK == 1: for tidx, translation in enumerate(translationBuffer[tgtlang]): if postprocessor(translation[1]).strip():