Explorar el Código

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 hace 6 meses
padre
commit
ed5f81b02e
No account linked to committer's email address
Se han modificado 2 ficheros con 3 adiciones y 1 borrados
  1. 1
    1
      deepdoc/vision/table_structure_recognizer.py
  2. 2
    0
      rag/app/manual.py

+ 1
- 1
deepdoc/vision/table_structure_recognizer.py Ver fichero

return "Ot" return "Ot"


@staticmethod @staticmethod
def construct_table(boxes, is_english=False, html=False, **kwargs):
def construct_table(boxes, is_english=False, html=True, **kwargs):
cap = "" cap = ""
i = 0 i = 0
while i < len(boxes): while i < len(boxes):

+ 2
- 0
rag/app/manual.py Ver fichero

if c.text == r.cells[j].text: if c.text == r.cells[j].text:
span += 1 span += 1
i = j i = j
else:
break
i += 1 i += 1
html += f"<td>{c.text}</td>" if span == 1 else f"<td colspan='{span}'>{c.text}</td>" html += f"<td>{c.text}</td>" if span == 1 else f"<td colspan='{span}'>{c.text}</td>"
html += "</tr>" html += "</tr>"

Cargando…
Cancelar
Guardar