mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-09 04:59:31 -06:00
K translations in pipeline
This commit is contained in:
@@ -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():
|
||||
|
||||
Reference in New Issue
Block a user