Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce characters sent to translation service #13

Open
2 tasks
Fevol opened this issue Jun 26, 2022 · 0 comments
Open
2 tasks

Reduce characters sent to translation service #13

Fevol opened this issue Jun 26, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@Fevol
Copy link
Owner

Fevol commented Jun 26, 2022

Currently, the entire input gets sent to the selected translation service. If multiple translations are executed on a block of text (say, when the user is typing in the Translation View and they wish to check if their intermediate result is correct), the amount of characters sent to the service will grow exponentially - even more so if the user has auto translate enabled.

The solution for this problem is to only translate the new text. Below are some approaches that could be taken:

Caching

Cache translation results of the service

  • Implement rudementary cache inside DummyTranslate
  • After each request, add translation for sentence

Issues

  • What is a sentence? Not all languages end on periods, so how should those be processed?
  • (cont.) How do you properly split a body of text such that the meaning is still identical?

Only changes

Only translate parts of the entered text that were changed

Issues

  • Might be hard to implement (what constitutes as a change? one letter can cause an entirely different interpretation of a sentence)
@Fevol Fevol added the enhancement New feature or request label Jun 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Backlog
Development

No branches or pull requests

1 participant