Просмотр исходного кода

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 год назад
Родитель
Сommit
d589b0f568
Аккаунт пользователя с таким Email не найден
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


Загрузка…
Отмена
Сохранить