浏览代码

Fix: exception layout_type in is_caption (#9028)

### What problem does this PR solve?

Exception layout_type in is_caption.

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
tags/v0.20.0
Yongteng Lei 3 个月前
父节点
当前提交
2ae8f2cf00
没有帐户链接到提交者的电子邮件
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1
    1
      deepdoc/vision/table_structure_recognizer.py

+ 1
- 1
deepdoc/vision/table_structure_recognizer.py 查看文件

@@ -97,7 +97,7 @@ class TableStructureRecognizer(Recognizer):
r"[图表]+[ 0-9::]{2,}"
]
if any([re.match(p, bx["text"].strip()) for p in patt]) \
or bx["layout_type"].find("caption") >= 0:
or bx.get("layout_type", "").find("caption") >= 0:
return True
return False


正在加载...
取消
保存