Index out of range in Lattice Parser
If a content of a table spills outside of the bounding line then it gets index of error. As table cell dosent have the index which is getting accessed due to spilling of table hence we are getting Index Out of rangepull/99/head
parent
1b30f8ecf9
commit
2bef60864a
|
|
@ -155,6 +155,7 @@ class Lattice(BaseParser):
|
|||
"""
|
||||
indices = []
|
||||
for r_idx, c_idx, text in idx:
|
||||
if r_idx in t.cells:
|
||||
for d in shift_text:
|
||||
if d == "l":
|
||||
if t.cells[r_idx][c_idx].hspan:
|
||||
|
|
@ -355,6 +356,7 @@ class Lattice(BaseParser):
|
|||
table, indices, shift_text=self.shift_text
|
||||
)
|
||||
for r_idx, c_idx, text in indices:
|
||||
if r_idx in table.cells:
|
||||
table.cells[r_idx][c_idx].text = text
|
||||
accuracy = compute_accuracy([[100, pos_errors]])
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue