mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-11-04 19:25:27 -07:00
K translations in pipeline
This commit is contained in:
1 parent
53f0307404
commit
8efff76703
1 file changed
+1
-1
@@ -357,7 +357,7 @@ def translation_pipeline(props):
|
|||||||
else:
|
else:
|
||||||
bestTranslationIdx = 0;
|
bestTranslationIdx = 0;
|
||||||
for tgtlang in targetLanguages:
|
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:
|
if bestK == 1:
|
||||||
for tidx, translation in enumerate(translationBuffer[tgtlang]):
|
for tidx, translation in enumerate(translationBuffer[tgtlang]):
|
||||||
if postprocessor(translation[1]).strip():
|
if postprocessor(translation[1]).strip():
|
||||||
|
|||||||
Reference in new issue
Block a user