deepl-python icon indicating copy to clipboard operation
deepl-python copied to clipboard

Weird char limit while translating using the translate_document_from_filepath endpoint

Open adityanshastry opened this issue 6 months ago • 2 comments

While using the python document translation endpoint translate_document_from_filepath, there seems to be a character limit of 15368 characters. This was tested with multiple configurations of flores-200 eng_latn.devtest file along with a few private text documents, both with English as the source and target language being French.

When the character limit is exceeded, the exception just says too many errors along with some references for document ids.

adityanshastry avatar Jun 27 '25 21:06 adityanshastry

Which document type are you using and how exactly are you testing this? The character limit should be 1 million characters, but it's not straightforward to use this as an end user, we might add more characters than are purely in the text for formatting etc depending on document type.

JanEbbing avatar Jun 30 '25 10:06 JanEbbing

This is meant to be a .txt file with one source sentence per line. The API call being used is the python function deepl_client.translate_document_from_filepath.

adityanshastry avatar Jun 30 '25 14:06 adityanshastry