Skip to content

Commit

Permalink
Merge pull request #902 from myhloli/fix-line-over-512
Browse files Browse the repository at this point in the history
refactor(pdf_parse): adjust line count threshold for layoutreader
  • Loading branch information
myhloli authored Nov 8, 2024
2 parents 2600d32 + 5936684 commit 5f79453
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion magic_pdf/pdf_parse_union_core_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ def sort_lines_by_model(fix_blocks, page_w, page_h, line_height):
block['lines'].append({'bbox': line, 'spans': []})
page_line_list.extend(lines)

if len(page_line_list) > 512: # layoutreader最高支持512line
if len(page_line_list) > 200: # layoutreader最高支持512line
return None

# 使用layoutreader排序
Expand Down

0 comments on commit 5f79453

Please sign in to comment.