Unverified Commit bf7d2c4f authored by Xiaomeng Zhao's avatar Xiaomeng Zhao Committed by GitHub
Browse files

Merge pull request #1018 from myhloli/dev

refactor(para): adjust right margin threshold based on block width
parents 98638bb6 69805f4b
...@@ -121,8 +121,12 @@ def __is_list_or_index_block(block): ...@@ -121,8 +121,12 @@ def __is_list_or_index_block(block):
right_close_num += 1 right_close_num += 1
else: else:
# 右侧不顶格情况下是否有一段距离,拍脑袋用0.3block宽度做阈值 # 右侧不顶格情况下是否有一段距离,拍脑袋用0.3block宽度做阈值
# 0.26 # block宽的阈值可以小些,block窄的阈值要大
closed_area = 0.35 * block_weight
if block_weight_radio >= 0.5:
closed_area = 0.26 * block_weight
else:
closed_area = 0.36 * block_weight
if block['bbox_fs'][2] - line['bbox'][2] > closed_area: if block['bbox_fs'][2] - line['bbox'][2] > closed_area:
right_not_close_num += 1 right_not_close_num += 1
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment