Comments (3)
It looks like that implementation splits the text on newlines; however, I was thinking about a more thoughtful approach in case the text doesn't have newlines. It might be possible to split also by punctuation and spaces.
from gpytranslate.
If I'm not mistaken, the maximum text length is limited to 2500 characters. You might consider dividing the text into smaller chunks and translating them separately. I plan on implementing this in the library soon.
Could you please provide more details about the text length you tried translating?
from gpytranslate.
Seems likely, the text had >7k characters. Maybe you can take inspiration from the following chunking implementation? https://github.com/BaseMax/UnlimitedAutoTranslate/blob/2aec131f0b1de9fe34c5ae9876916aef4aef698d/UnlimitedAutoTranslate.py#L5 - It seems to use a max_limit of 4500 chars
from gpytranslate.
Related Issues (10)
- unable to translate some texts HOT 1
- ConnectError exception while using a local proxy HOT 4
- httpx.ProxyError: [Errno -2] Name or service not known HOT 6
- about the proxy HOT 1
- Clients5.google.com is potentially dangerous HOT 1
- [Bug]: We need an empty response handler HOT 13
- JSONDecodeError HOT 7
- [Bug]: TypeError: Response.iter_bytes() got an unexpected keyword argument 'chunk_size' HOT 2
- Library cannot be used in Python 3.6 and 3.7 HOT 1
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 gpytranslate.