Commit 9951a170 authored by myhloli's avatar myhloli
Browse files

style(pdf_parse_union_core_v2): remove unnecessary spaces and improve code...

style(pdf_parse_union_core_v2): remove unnecessary spaces and improve code formatting- Remove extra space in conditional statement for character spacing logic
- Adjust spacing in trigonometric checks for line direction- Improve overall code readability and consistency
parent 16a0a350
...@@ -182,7 +182,7 @@ def txt_spans_extract_v2(pdf_page, spans, all_bboxes, all_discarded_blocks, lang ...@@ -182,7 +182,7 @@ def txt_spans_extract_v2(pdf_page, spans, all_bboxes, all_discarded_blocks, lang
for block in text_blocks_raw: for block in text_blocks_raw:
for line in block['lines']: for line in block['lines']:
cosine, sine = line['dir'] cosine, sine = line['dir']
if abs (cosine) < 0.9 or abs(sine) > 0.1: if abs(cosine) < 0.9 or abs(sine) > 0.1:
continue continue
for span in line['spans']: for span in line['spans']:
all_pymu_chars.extend(span['chars']) all_pymu_chars.extend(span['chars'])
......
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