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

🚀 Feature Request: Transcriptions for non-Latin script languages #458

Open
4 tasks done
thesla13 opened this issue Mar 18, 2024 · 3 comments
Open
4 tasks done
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@thesla13
Copy link

thesla13 commented Mar 18, 2024

Please confirm the following:

  • I have carefully read the README
  • I have searched through the issues page and didn't find a similar feature request.(Including issue that has been closed)
  • Easydict has been upgraded to the latest version
  • I understand and agree to the above, and understand that the project maintainer has limited energy, issues that do not follow the rules may be ignored or closed directly

Feature description

Hey, Tisfeng!

I have been using Easydict to dabble in Chinese and Japanese. And find it super useful when Easydict not only does OCR and provides text-to-speach and translation, but also shows transcription for the characters of these languages.

However. (And the following concerns mostly Google and Bing services, as Youdao only shows Pinyin readings for two-character Chinese words, and others do not seem to provide any transcriptions at all.) However — the problem is there is a strict limit on how long a query would be provided with a transcription. I've experimented a bit, and as of now it seems to work as follows:

Japanese: Google doesn't give transcriptions at all. Bing does, but for queries of up to 7 characters long. 8-char long phrase would be shown without a reading.

Chinese: Google works for up to 4 characters. 5 and more — no Pinyin. Bing, again, up to 7. 8 and more — no such luck.

Use case

I do understand that providing transcriptions for long passages within Easydict's window would clutter the interface considerably. But still, 15- or 20-char phrases — do seem adequate to me. And at least having an option in settings to enable it would be super-super useful to me. And, again, as it works now — seems to be highly illogical: 4-char limit here, 7-char there (and 7 seems to be especially weird for Chinese with two-character words and 4- and 8-character names for things and concepts).

Please, pretty please, do consider looking into this.

Thank you so very much for your wonderful app and your hard work!

ja 2a
🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨
ja 3a
🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨
ja 1a
🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨
zh 1a
🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨
zh 2a
🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨
zh 3a
🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨
zh 4a

@thesla13 thesla13 added the enhancement New feature or request label Mar 18, 2024
@tisfeng
Copy link
Owner

tisfeng commented Mar 22, 2024

OK, I'll take a closer look later.

@tisfeng tisfeng added the good first issue Good for newcomers label Apr 12, 2024
@tisfeng
Copy link
Owner

tisfeng commented Apr 12, 2024

Thanks for the feedback, we've checked it out and realized that there is indeed some rather confusing logic here, so let me explain.

Youdao

Youdao's web interface for dictionaries is a bit tricky to parse, and it works best with English and Chinese dictionaries, so we mainly use this API. For Chinese, it seems to only support pinyin display for Chinese characters of 1-2 characters, and won't display any longer than that.

Google

Due to historical reasons, we have two API for Google Translate, they are used in different scenarios, because one of them is good at looking up dictionaries, and the other is good at translating long texts.

So, for very short Chinese words, length <= 4, which is the length of common Chinese idioms, we will call the dictionary API, which has phonetic symbols, while the long text translation API itself has no phonetic symbols.

This is really not good, we will improve the Google Translate API later, for example, we will try to use the official web interface, and try our best to show the phonetic symbols of long text if it has.

Bing

Bing is the only one that we actively limit the length of phonetic symbols displayed, because its translation API will return very long text length phonetic symbols, if we don't limit it, it will lead to a very ugly UI, the phonetic symbols display control is only one line, and the window width is limited.

Here the limit is 7, because it is the length of an ancient Chinese poem, for example [曾沧海难为水].

@tisfeng
Copy link
Owner

tisfeng commented Apr 12, 2024

We will improve the display length of the phonetic symbols later, for now please click on the link button to go to the web page to see the phonetic symbols for long text.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants