Comments (7)
@AdamElitzur Yep you got it exactly right! I'm glad that solution works for you!
from google-translate-api.
I'm glad you're liking it! My immediate guess would have been that it was because of forceBatch
but you already set that to false so I'd have to investigate. I'll try to take a look when I get a chance soon (If I take too long feel free to @ me)
from google-translate-api.
Thanks so much! Let me know if you find anything, and if it's happening on your side or not.
from google-translate-api.
@AidanWelch I hope all is well! Finding anything yet with the discrepancy? Anything else I should try in the meantime? Thanks so much.
from google-translate-api.
Well, the issue is with batch translation as
translate('ארים ראשי, אשא עיני אל ההרים במרחקים', {from: 'he', to: 'en', forceBatch: false, fallbackBatch: false}); // => res.text === 'I lift my head, I will lift my eyes to the mountains in the distance'
However that responds with Error: Too Many Requests
sometimes. So, it must just be more aggressive rate limiting. With fallbackBatch: true
when singleTranslate fails then batchTranslate is called rather than throwing an error. But, to be honest, it might have been a mistake on my part to degrade translation quality rather than throw an error by default.
Basically, forceBatch: false
and fallbackBatch: false
must be set to force the more accurate singleTranslate.
from google-translate-api.
@AdamElitzur (Just pinging in case you didn't get the notification)
from google-translate-api.
Thanks so much @AidanWelch! If I set forceBatch: false and fallbackBatch: false, then could that cause errors if there are too many requests?
I would like for a translation to show no matter what, even if the quality is worse, if that is the best possible outcome (better than an error). So actually, I like your move to degrade translation quality rather than throw an error by default! Thank you!
from google-translate-api.
Related Issues (20)
- It throws error "fetch is not defined" HOT 2
- Tests fail only because rate limited on single translate HOT 1
- TypeError: (0 , _googleTranslateApiX.translate) is not a function HOT 17
- google-translate-api-x gives below error HOT 3
- Improve `speak` testing
- Caught an error from batch translate HOT 8
- ERROR [TypeError: Cannot convert null value to object] HOT 2
- Issue with the speak functionality HOT 2
- Batch translation error HOT 4
- Can't run on React.js HOT 2
- Big translation slowed down HOT 11
- change speak speed HOT 2
- fetch is not defined after deployment HOT 2
- CORS policy error HOT 4
- Obtain translation synonyms HOT 1
- How to translate image HOT 2
- Is proxying supported in react native? HOT 1
- Autocorrect example provides different output HOT 1
- `res.from.language.didYouMean` is always true
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 google-translate-api.