Skip to content

Commit

Permalink
update tbpu
Browse files Browse the repository at this point in the history
  • Loading branch information
hiroi-sora committed Aug 11, 2024
1 parent f601c3c commit e6c8b26
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 0 additions & 1 deletion UmiOCR-data/py_src/ocr/tbpu/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# tbpu : text block processing unit 文本块后处理

from .parser_none import ParserNone
from .ignore_area import IgnoreArea

from .parser_multi_para import MultiPara
from .parser_multi_line import MultiLine
Expand Down
6 changes: 5 additions & 1 deletion UmiOCR-data/py_src/ocr/tbpu/tbpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ def __init__(self):
self.tbpuName = "文块处理单元-未知"

def run(self, textBlocks):
"""输入:textBlocks文块列表\n
"""输入:textBlocks文块列表。例:\n
[
{'box': [[29, 19], [172, 19], [172, 44], [29, 44]], 'score': 0.89, 'text': '文本111'},
{'box': [[29, 60], [161, 60], [161, 86], [29, 86]], 'score': 0.75, 'text': '文本222'},
]
输出:排序后的textBlocks文块列表,每个块增加键:
'end' 结尾间隔符
"""
Expand Down

0 comments on commit e6c8b26

Please sign in to comment.