Преглед изворни кода

fix exception in pdf parser (#584)

### What problem does this PR solve?
#451 

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
tags/v0.5.0
KevinHuSh пре 1 година
родитељ
комит
d589b0f568
No account linked to committer's email address
1 измењених фајлова са 2 додато и 1 уклоњено
  1. 2
    1
      deepdoc/parser/pdf_parser.py

+ 2
- 1
deepdoc/parser/pdf_parser.py Прегледај датотеку

@@ -470,7 +470,8 @@ class RAGFlowPdfParser:
continue

if re.match(r"[0-9]{2,3}/[0-9]{3}$", up["text"]) \
or re.match(r"[0-9]{2,3}/[0-9]{3}$", down["text"]):
or re.match(r"[0-9]{2,3}/[0-9]{3}$", down["text"]) \
or not down["text"].strip():
i += 1
continue


Loading…
Откажи
Сачувај