nextcloud / nextcloud/translate2

Support large input texts with more than 250 words

Open
#71 6 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement priority: medium
Dominant language
Python
Stars
6
Forks
3
Avg merge
1d 14h
Merged PRs (30d)
1

Description

How to use GitHub
  • Please use the 👍 reaction to show that you are interested into the same feature.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Feature request

Which Nextcloud Version are you currently using: v32.0.0

Is your feature request related to a problem? Please describe.
Large input texts get cut off at some point in the corresponing translation/output text. This seems to vary based on the target language chosen and the max_decoding_length param does not help here much even with high values.

Describe the solution you'd like
Chunking of the input text, maybe in around 100 words, to keep the translation input chunks small and digestable by the model.
Note: split and join of the texts will need some special care depending on the language of the input text, for different separators, RTL languages and no-space languages.

Describe alternatives you've considered
Split the input text by hand.

Additional context

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the current translation path that calls CTranslate2's translate_batch, then read the related issue #68 and the translate_iterable documentation. The work is done when texts over 250 words are chunked and reassembled without truncation across target languages, including separators, RTL languages, and languages without spaces.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.