Skip to content

Commit

Permalink
fix bug about divided by zero (#1482)
Browse files Browse the repository at this point in the history
### What problem does this PR solve?


### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
  • Loading branch information
KevinHuSh authored Jul 12, 2024
1 parent 99f7bba commit d29fd52
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion deepdoc/parser/pdf_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ def __ocr(self, pagenum, img, chars, ZM=3):
)

# solve char content confusion
record_error_length, ct = 0, 1
record_error_length, ct = 0, 0.001
for c in chars[0:128]:
ii = Recognizer.find_overlapped(c, bxs)
if ii is None:
Expand Down

0 comments on commit d29fd52

Please sign in to comment.