๐ต๐ฑ <-> ๐ฌ๐ง Batch ByT5 Translator (Auto-Detect, Smart Chunking)
Translate multiple lines of text between Polish and English. Model: Gregniuki/pl-en-pl Text is automatically split into chunks of max 20 words, prioritizing breaks at . ! ? and ,
Enter text (you can paste multiple paragraphs or sentences). Click Submit to translate.
Chunking Logic:
- The entire input box content is split into potential 'sentence segments' using . ! ? as delimiters.
- Each segment is checked for word count.
- If a segment is <= {MAX_WORDS_PER_CHUNK} words, it's treated as a single chunk.
- If a segment is > {MAX_WORDS_PER_CHUNK} words, it's further split internally using commas (,) as preferred break points.
- If a long segment has no commas, or comma splitting isn't sufficient, it falls back to breaking purely by word count near {MAX_WORDS_PER_CHUNK} to avoid excessively long chunks.
- These final chunks are batched and translated.