support confidences in find-entities

pull/9/head
Kai 4 years ago
parent 9b3198e401
commit 0da38d6ec6

@ -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))

Loading…
Cancel
Save