Skip to content

Commit

Permalink
update annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
myhloli committed May 31, 2024
1 parent 75478ed commit 496045f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion magic_pdf/user_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def calculate_not_printable_rate(text):

# not_common_character_rate = calculate_not_common_character_rate(text_all)
not_printable_rate = calculate_not_printable_rate(text_all)
# 测试乱码pdf,not_common_character_rate > 0.9, not_printable_rate > 0.1
# 测试乱码pdf,not_common_character_rate > 0.95, not_printable_rate > 0.15
# not_common_character_rate对小语种可能会有误伤,not_printable_rate对小语种较为友好
if pdf_info_dict is None or pdf_info_dict.get("_need_drop", False) or not_printable_rate > 0.1:
logger.warning(f"parse_pdf_by_txt drop or error or garbled_rate too large, switch to parse_pdf_by_ocr")
Expand Down

0 comments on commit 496045f

Please sign in to comment.