mirror of
https://github.com/deepset-ai/haystack.git
synced 2025-11-02 10:49:30 +00:00
Fix table extraction in ParsrConverter (#2262)
This commit is contained in:
parent
c5542bd3fb
commit
a5501c72cf
@ -197,9 +197,12 @@ class ParsrConverter(BaseConverter):
|
||||
elem_idx: int,
|
||||
meta: Optional[Dict[str, str]] = None,
|
||||
) -> Dict[str, Any]:
|
||||
|
||||
row_idx_start = 0
|
||||
caption = ""
|
||||
table_list = [[""] * len(element["content"][0]["content"]) for _ in range(len(element["content"]))]
|
||||
number_of_columns = max([len(row["content"]) for row in element["content"]])
|
||||
number_of_rows = len(element["content"])
|
||||
table_list = [[""] * number_of_columns for _ in range(number_of_rows)]
|
||||
|
||||
for row_idx, row in enumerate(element["content"]):
|
||||
for col_idx, cell in enumerate(row["content"]):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user