Skip to content

Commit

Permalink
fix llm table merging error
Browse files Browse the repository at this point in the history
  • Loading branch information
iammosespaulr committed Feb 3, 2025
1 parent 93deddd commit 4e0fadc
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions marker/processors/llm/llm_table_merge.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ class LLMTableMergeProcessor(BaseLLMProcessor):

@staticmethod
def get_row_count(cells: List[TableCell]):
if not cells:
return 0

max_rows = None
for col_id in set([cell.col_id for cell in cells]):
col_cells = [cell for cell in cells if cell.col_id == col_id]
Expand All @@ -126,6 +129,9 @@ def get_row_count(cells: List[TableCell]):

@staticmethod
def get_column_count(cells: List[TableCell]):
if not cells:
return 0

max_cols = None
for row_id in set([cell.row_id for cell in cells]):
row_cells = [cell for cell in cells if cell.row_id == row_id]
Expand Down

0 comments on commit 4e0fadc

Please sign in to comment.