Comments (3)
@Senjar Generally speaking, the total number of words in each translation should not exceed 5000. A good batch partition of the article needs to consider translating more content at one time as much as possible, the integrity of the sentence itself in the partition area, and the integrity of the context in the partition area, but this is not what the library is going to do.
from translators.
What I'm trying to do is translate a list of sentences that are not related. I can combine them all up in a single string but then I can't split them back after the translation. I tried putting custom delimiters but sometimes they are lost for some reason in the translated text.
from translators.
@Senjar Just like what you need, your current method is an efficient one. Maybe you just need to understand what delimiter is in the to_language
context after translation in the from_langauge
context. Another way is to translate a single sentence directly without merging. In this way, concurrency should be considered and the frequency of requests should be paid attention to. In addition, the third way is to use is_detail_result=True
, there will be surprises.
from translators.
Related Issues (20)
- [Bug]: raise TranslatorError('Google service was offline in inland of China on Oct 2022.') HOT 1
- [Bug]: translator caiyun: AttributeError: 'NoneType' object has no attribute 'group' HOT 4
- [Feature]: Normalized translation return object/dict HOT 2
- [Feature]: Return the chosen language (handy when using 'auto') HOT 2
- [Bug]: "The `query_text` can't be empty!" in translate_html HOT 1
- [Bug]: workaround of consent.google.com doesn't work anymore HOT 11
- [Feature]: Translation services (eg Bing) easily rate limited HOT 1
- [Bug]: translator server - google: language map is empty so getting error "Unsupported from_language[ar] in []" HOT 24
- [Bug]: Python 3 doesn't like re with Positive Lookbehind ? HOT 2
- [Bug]: KeyError: 'data' when using baidu HOT 2
- [Bug]: "Using region <name> server backend." printed on stdout HOT 1
- [Feature]: Georgian language HOT 1
- [Bug]: translate_html strips whitespace HOT 1
- [Bug]: Misleading error message HOT 1
- [Bug]: iciba not working now HOT 2
- [Feature]: 统一所有翻译器的源语言代码和目标语言代码 HOT 2
- [Bug]: Unable to find server backend. HOT 1
- [Bug]: crash HOT 3
- [Bug]: The function baidu() has been not certified yet HOT 3
- [Bug]: 504 Server Error: Gateway Time-out for url: https://aidemo.youdao.com/trans HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from translators.