|
|
@@ -250,7 +250,6 @@ class MinerUVLRecognizer(BaseVLRecognizer):
|
|
|
return {
|
|
|
'html': table_content,
|
|
|
'markdown': self._html_to_markdown(table_content),
|
|
|
- 'cells': self._extract_cells_from_html(table_content) if kwargs.get('return_cells_coordinate', False) else []
|
|
|
}
|
|
|
|
|
|
except Exception as e:
|
|
|
@@ -427,22 +426,6 @@ class MinerUVLRecognizer(BaseVLRecognizer):
|
|
|
# print(f"⚠️ HTML to Markdown conversion failed: {e}")
|
|
|
# return html
|
|
|
|
|
|
- def _extract_cells_from_html(self, html: str) -> List[Dict[str, Any]]:
|
|
|
- """从HTML中提取单元格信息(简化版本)"""
|
|
|
- if not html:
|
|
|
- return []
|
|
|
-
|
|
|
- try:
|
|
|
- # 这里只是示例,实际需要解析HTML DOM
|
|
|
- # 可以使用 BeautifulSoup 等库
|
|
|
- cells = []
|
|
|
- # TODO: 实现HTML解析逻辑
|
|
|
- return cells
|
|
|
-
|
|
|
- except Exception as e:
|
|
|
- print(f"⚠️ Cell extraction failed: {e}")
|
|
|
- return []
|
|
|
-
|
|
|
class MinerUOCRRecognizer(BaseOCRRecognizer):
|
|
|
"""MinerU OCR识别适配器"""
|
|
|
|