Skip to content

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

Fix: abnormal cell mergeing. (#6991)

Kevin Hued5f81b02e82
diff --git a/deepdoc/vision/table_structure_recognizer.py b/deepdoc/vision/table_structure_recognizer.py
index 64ad8b92f8..470abc3b6d 100644
--- a/deepdoc/vision/table_structure_recognizer.py
+++ b/deepdoc/vision/table_structure_recognizer.py
@@ -133,7 +133,7 @@ class TableStructureRecognizer(Recognizer):
return "Ot"
@staticmethod
- def construct_table(boxes, is_english=False, html=False, **kwargs):
+ def construct_table(boxes, is_english=False, html=True, **kwargs):
cap = ""
i = 0
while i < len(boxes):
diff --git a/rag/app/manual.py b/rag/app/manual.py
index 5de782d647..a05670a0e3 100644
--- a/rag/app/manual.py
+++ b/rag/app/manual.py
@@ -162,6 +162,8 @@ class Docx(DocxParser):
if c.text == r.cells[j].text:
span += 1
i = j
+ else:
+ break
i += 1
html += f"<td>{c.text}</td>" if span == 1 else f"<td colspan='{span}'>{c.text}</td>"
html += "</tr>"