Merge 1da6be8863 into 644bbe7c6d
commit
7e619e6c81
|
|
@ -186,6 +186,7 @@ class Lattice(BaseParser):
|
||||||
"""
|
"""
|
||||||
indices = []
|
indices = []
|
||||||
for r_idx, c_idx, text in idx:
|
for r_idx, c_idx, text in idx:
|
||||||
|
if r_idx < len(t.cells) and c_idx < len(t.cells[r_idx]):
|
||||||
for d in shift_text:
|
for d in shift_text:
|
||||||
if d == "l":
|
if d == "l":
|
||||||
if t.cells[r_idx][c_idx].hspan:
|
if t.cells[r_idx][c_idx].hspan:
|
||||||
|
|
@ -373,6 +374,7 @@ class Lattice(BaseParser):
|
||||||
table, indices, shift_text=self.shift_text
|
table, indices, shift_text=self.shift_text
|
||||||
)
|
)
|
||||||
for r_idx, c_idx, text in indices:
|
for r_idx, c_idx, text in indices:
|
||||||
|
if r_idx < len(table.cells) and c_idx < len(table.cells[r_idx]):
|
||||||
table.cells[r_idx][c_idx].text = text
|
table.cells[r_idx][c_idx].text = text
|
||||||
accuracy = compute_accuracy([[100, pos_errors]])
|
accuracy = compute_accuracy([[100, pos_errors]])
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue