-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
extra spaces in result when ocr chinese #991
Comments
@zdenop @Shreeshrii @stweil |
@theraysmith Is there any config which will change this? |
#988 regarding Japanese is also about similar results. Could it be related in any way to handling of non-space delimited languages/CJK? |
Possibly because of
|
Similar problem with Korean. |
I've also tested jpn and kor images , the results have similar problem. |
sorry for my bad english |
Using the solution suggested in #1009 See attached output files:
Please note that this behavior is different from the behaviour of @theraysmith Is this intentional for 4.0? Since there are reports of |
great, it works. Actually I noticed this variable, but I misunderstood and set it to false, definitely it doesn't work as expected.
|
@Shreeshrii can you help me ? i'm get wrong coordinate for last char in word. Thanks! |
Sorry, @hoangtocdo90 . I do not know about |
This fix can be applied via adding the following to the config file and then running combine_tessdata.
This applies to Chinese, Japanese and Korean. |
Fixed via @zdenop Please close this issue, after PR is merged in tessdata_fast. |
This comment was marked as off-topic.
This comment was marked as off-topic.
@Shreeshrii, I just want to add
Is that correct? |
@stweil Yes, that's right. Thank you. |
I fixed |
What about |
@stweil actually,I used this method to extract the training data before I saw your article, but the pdf copy still had Spaces. That is to say, the exported txt does not have Spaces, but the pdf copy text still has extra Spaces. I should also note that another workaround is to use the congfig setting without having to modify the training data.
preserve_interword_spaces 1 |
@ZetaLin same issue here. The raw text output is right but when output to PDF there is a space between every character. |
Does that still work for you? I tried that but it's not working for me., don't know what to do |
win8.1 64bit tesseract 4.0.0alpha leptonica-1.74.2 (Jun 6 2017, 21:45:59) [MSC v.1910 LIB Release x64]
the reslut always contains extra spaces between character when using oem LstmOnly or TesseractAndLstm, oem TesseractOnly works normally but the result is bad.
oem: Default psm: SingleLine time: 114 ms. result: 伦 敦 楼 房 发 生 火 灾 中 使 馆 关 注 : 暂 无 中 国 公 民 受 伤
oem: TesseractOnly psm: AutoOsd time: 518 ms. result: 伦敦夺委房发生火火中使馆大汪 二 暂无中 ` 又伤
result_lines_chi.txt
The text was updated successfully, but these errors were encountered: