Skip to content

Conversation

@shriramters
Copy link

KotkiTranslationModel::translate only processed a single batch of text. When a large input string was provided, it was correctly segmented into multiple batches by the TextProcessor and enqueued. However, the translate function would only generate and translate the first batch, leaving the remaining segments unprocessed in the BatchingPool.

This resulted in an incomplete translation, where
request->response.target.text would remain empty because the ResponseBuilder was never triggered for the full set of segments.

This commit resolves the issue by introducing a loop in the translate function.

Fixes #8

`KotkiTranslationModel::translate` only processed a single batch of
text. When a large input string was provided, it was correctly
segmented into multiple batches by the `TextProcessor` and
enqueued. However, the `translate` function would only generate and
translate the first batch, leaving the remaining segments unprocessed
in the `BatchingPool`.

This resulted in an incomplete translation, where
`request->response.target.text` would remain empty because the
`ResponseBuilder` was never triggered for the full set of segments.

This commit resolves the issue by introducing a loop in the
`translate` function.

Fixes kroketio#8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Result is blank for large text input

1 participant