microsoft / PowerToys

Windows system utilities to maximize productivity
MIT License
110.52k stars 6.5k forks source link

Text extractor is difficult to recognize Chinese, and often does not respond to Chinese selected #20465

Closed LYXOfficial closed 2 years ago

LYXOfficial commented 2 years ago

Microsoft PowerToys version

0.62.0

Running as admin

Area(s) with issue?

TextExtractor

Steps to reproduce

win+shift+t,select some Chinese text

✔️ Expected Behavior

It can normally recognize Chinese in the picture and paste it on the clipboard

❌ Actual Behavior

However, it does not exit the recognition mode after being selected, and the clipboard does not have the expected contents

Other Software

No response

shookietea commented 2 years ago

I'll piggyback here, as I assume Japanese will be similar to the issue with Chinese text selection. Particularly as my main use case would be copying Kanji. I'm having the same issue as described when attempting to select Japanese text.

image image

SodaWithoutSparkles commented 2 years ago

Can confirm. It appears that if the text is not recognised it does not exit the select mode too. The first few times using it would fail then maybe it found out you are trying to recognise Chinese and installed the relevant files for it?

Here's a sample text in Chinese: Wikipedia of Chinese

Sometimes it can recognise the text but puts spaces between each character where it shouldn't be And sometimes, even if the text is perfectly clear, it would not recognise them or recognise them as another character, or split a character into two half Example Edit: it seems that this issue is very common for small text, like the default font size on most webpages

And sometimes it fails to understand the context when two characters are similar but have different meanings. For example, "入" (in) and "人" (human) can look similar but "深人" (deep people?) doesn't make any sense and "深入" (In-depth) does.

LYXOfficial commented 2 years ago

嗯,楼上说的很对,主要是一些较小字体的bug,而且识别准确率不高,建议换用中国本土的文字识别api以提升识别成功率,识别文本的空格问题也很严重(不如用utools呢)

Well, what I said above is right, mainly because of some small font bugs, and the recognition accuracy is not high. It is recommended to use Chinese native character recognition API to improve the recognition success rate. The problem of recognizing text spaces is also very serious (it's better to use utools)

SodaWithoutSparkles commented 2 years ago

嗯,楼上说的很对,主要是一些较小字体的bug,而且识别准确率不高,建议换用中国本土的文字识别api以提升识别成功率,识别文本的空格问题也很严重(不如用utools呢)

(Translation) The comment above was right. Small fonts will cause unexpected behaviours. Also the OCR isnt very accurate. I suggest using a OCR API dedicated to Chinese / developed by Chinese to increase OCR accuracy. There are also a lot of extra spaces between characters. In this state I would be better off using utools. (End Translation)

@LYXOfficial 帮你翻译了,你的翻译准确度堪忧啊。对于"楼上"等有额外含义的词语和运用本土化语法的句子 翻译软体抓得不太准,我帮你人工翻译了。 (To English speakers, this paragraph explains the cause of translation issues to LYX and translated manually for him/her )

SodaWithoutSparkles commented 2 years ago

xfyun 讯飞 has a multi-lingual OCR API for printed documents but require a API key.

I believe google has one but cost money

szhu25 commented 2 years ago

I think the purpose of this tool is to use OCR without third party dependency, and without internet access (If I'm right, this tool utilizes Windows native OCR functionality instead of third party or cloud services).

SodaWithoutSparkles commented 2 years ago

I think the purpose of this tool is to use OCR without third party dependency, and without internet access

If so can we fix the extra spaces between each character?

szhu25 commented 2 years ago

If so can we fix the extra spaces between each character?

I'm not a developer so I have no idea... Maybe try this app and see if you have the same issue? https://apps.microsoft.com/store/detail/text-grab/9MZNKQJ7SL0B

If that app has a similar issue, then it's not a coding error / bug when the code got copied from Text Grab to PowerToys.

Information: Based on PR #19172, most OCR function codes are copied from the app Text Grab (whose author is the author for that pull request).

SodaWithoutSparkles commented 2 years ago

Well, I believe its a issue of weatern developers forgot that some languages might not have spaces between each word/character like english does, so just blindly added a space. I will try the app later

taras-janea commented 2 years ago

As mentioned above, Chinese and Japanese recognition quality, that's the Windows OCR engine limitations. Extra white spaces is a duplicate of another issue. Additional comments may be added there. /dup #20319

ghost commented 2 years ago

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

Korb commented 2 years ago

Similar problem with Russian language:

Screenshot 2022-09-14 at 10-41-06 Microsoft PowerToys

Original text:

Цветоподборщик — это служебная программа для подбора цветов на уровне системы, которая активируется клавишами WIN+SHIFT+C. Вы можете выбрать цвета из любого запущенного приложения: средство выбора автоматически скопирует цвет в буфер обмена в настраиваемом формате. Цветоподборщик содержит редактор, в котором отображается журнал ранее подобранных цветов. Он позволяет точно настроить выбранный цвет и скопировать разные строковые представления. Этот код основан на средстве Color Picker, разработанном Мартином Хршаном (Martin Chrzan).

Microsoft PowerToys 0.62.0:

— это слу;кебнзя для подеерз ц=тав нз уровне системы, которая активируется ип(+ с , Вы мсс•ЕЕ выбрать из люЕого зпуиен ного прилсс•ен и я: ср—: тш выеора зетоматича:ки сюэпирует в буфер обмена в нас формате. сорзкит в котор:ом отобрапется журнал ран— под:фнных Он псввтпт точно настроить выбранный и скопи;еать веления. Этот на СоЬг РЕКег. рззр:вЕотанном Мартином Хрип ном (k•1artin

ABBYY Screenshot Reader 15.0.114.4683:

Цветоподборщик — это служебная программа для подбора цветов на уровне системы, которая активируется клавишами ног + эшт + с, Вы можете выбрать цвета из любого запущенного приложения: сред: тво выбора автоматически скопирует цвет в буфер обмена в настраиваемом формате. Цветоподборщик содержит редектор, в котором отображается журнал ранее подобранных цветов. Он позволяет точно настроить выбранный цвет и скопировать разные строковые предетавления. Этот код основан на с ред: тве Color Рккег, разработанном Мартином Хршзном (Martin Chrzan).