Merge pull request from Evezerest/table2

change label filename
pull/6126/head
whjdark 2022-05-06 13:32:33 +08:00 committed by GitHub
commit 1f3ca7a552
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions
PPOCRLabel

View File

@ -2382,7 +2382,7 @@ class MainWindow(QMainWindow):
# save dict
html = {'structure': {'tokens': token_list}, 'cell': cells}
json_results.append({'filename': filename, 'split': split, 'imgid': imgid, 'html': html})
json_results.append({'filename': os.path.basename(image_path), 'split': split, 'imgid': imgid, 'html': html})
imgid += 1
# save json

View File

@ -225,7 +225,7 @@ def convert_token(html_list):
if 'rowspan' in col:
_, n = col.split('rowspan=')
token_list.append(" rowspan=\"{}\"".format(n))
token_list.append(">")
token_list.extend([">", "</td>"])
token_list.append("</tr>")
token_list.append("</tbody>")