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:
parent
9b3198e401
commit
0da38d6ec6
1 changed files with 4 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue