Parcourir la source

Fix: abnormal cell mergeing. (#6991)

### What problem does this PR solve?


### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
tags/v0.18.0
Kevin Hu il y a 6 mois
Parent
révision
ed5f81b02e
Aucun compte lié à l'adresse e-mail de l'auteur
2 fichiers modifiés avec 3 ajouts et 1 suppressions
  1. 1
    1
      deepdoc/vision/table_structure_recognizer.py
  2. 2
    0
      rag/app/manual.py

+ 1
- 1
deepdoc/vision/table_structure_recognizer.py Voir le fichier

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

+ 2
- 0
rag/app/manual.py Voir le fichier

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

Chargement…
Annuler
Enregistrer