Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

fix bug about divided by zero (#1482)

Kevin Hud29fd52e145b
diff --git a/deepdoc/parser/pdf_parser.py b/deepdoc/parser/pdf_parser.py
index 819bc74850..29947f7d93 100644
--- a/deepdoc/parser/pdf_parser.py
+++ b/deepdoc/parser/pdf_parser.py
@@ -287,7 +287,7 @@ class RAGFlowPdfParser:
)
# solve char content confusion
- record_error_length, ct = 0, 1
+ record_error_length, ct = 0, 0.001
for c in chars[0:128]:
ii = Recognizer.find_overlapped(c, bxs)
if ii is None: