Pārlūkot izejas kodu

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 pirms 1 gada
vecāks
revīzija
d589b0f568
Revīzijas autora e-pasta adrese nav piesaistīta nevienam kontam
1 mainītis faili ar 2 papildinājumiem un 1 dzēšanām
  1. 2
    1
      deepdoc/parser/pdf_parser.py

+ 2
- 1
deepdoc/parser/pdf_parser.py Parādīt failu

@@ -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


Notiek ielāde…
Atcelt
Saglabāt