1
0
Fork 0
mirror of https://github.com/qurator-spk/page2tsv.git synced 2025-06-09 19:39:54 +02:00

support confidences in find-entities

This commit is contained in:
Kai 2021-05-06 13:01:41 +02:00
parent 9b3198e401
commit 0da38d6ec6

View file

@ -15,7 +15,10 @@ def read_tsv(tsv_file):
def write_tsv(tsv, urls, tsv_out_file):
out_columns = ['No.', 'TOKEN', 'NE-TAG', 'NE-EMB', 'ID', 'url_id', 'left', 'right', 'top', 'bottom']
if 'conf' in tsv.columns():
out_columns = ['No.', 'TOKEN', 'NE-TAG', 'NE-EMB', 'ID', 'url_id', 'left', 'right', 'top', 'bottom', 'conf']
else:
out_columns = ['No.', 'TOKEN', 'NE-TAG', 'NE-EMB', 'ID', 'url_id', 'left', 'right', 'top', 'bottom']
if len(urls) == 0:
print('Writing to {}...'.format(tsv_out_file))