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

Missing space between words #1579

Closed
hxt365 opened this issue Jan 20, 2025 · 1 comment
Closed

Missing space between words #1579

hxt365 opened this issue Jan 20, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@hxt365
Copy link

hxt365 commented Jan 20, 2025

Description of the bug | 错误描述

rapid_table model fails to preserve spaces between words. Please take a look at the column titles in the below example.

Image

ConsolidatedsalesFirst9monthsReportedchangeCurrencyOrganic
(Dollarsinmillions)20242023(U.S.GAAP)effects1)change*
Airbags, Steering Wheels and Other2)$5,264$5,1911.4%(1.0)%2.4%
SeatbeltProductsandOther2)2,5112,533(0.9)%(1.2)%0.3%
Total$7,774$7,7240.7%(1.1)%1.7%
Americas$2,637$2,665(1.0)%(0.2)%(0.8)%
Europe2,2312,1225.2%1.4%3.7%
China1,4231,488(4.4)%(2.0)%(2.3)%
Asiaexcl.China1,4831,4492.3%(5.3)%7.7%
Total$7,774$7,7240.7%(1.1)%1.7%

How to reproduce the bug | 如何复现

Run magic-pdf on the provided table.

Operating system | 操作系统

Linux

Python version | Python 版本

3.10

Software version | 软件版本 (magic-pdf --version)

1.0.x

Device mode | 设备模式

cuda

@hxt365 hxt365 added the bug Something isn't working label Jan 20, 2025
@myhloli
Copy link
Collaborator

myhloli commented Jan 22, 2025

Currently, the OCR model used for table parsing is a Chinese-English mixed model. For some English words that are close to each other, there may be issues with missing spaces. We do not have plans to fix this issue in the short term. A possible solution is to replace the existing RapidOCR backend with one that offers better performance for English text parsing:

Please replace the original RapidOCR with a more suitable alternative as indicated.

@myhloli myhloli closed this as completed Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants