|
|
@ -32,16 +32,12 @@ def gen_diff_report(gt_in, ocr_in, css_prefix, joiner, none, differences=False):
|
|
|
|
|
|
|
|
|
|
|
|
# Set Bootstrap tooltip to the segment id
|
|
|
|
# Set Bootstrap tooltip to the segment id
|
|
|
|
if id_:
|
|
|
|
if id_:
|
|
|
|
html_custom_attrs += 'data-toggle="tooltip" title="{}"'.format(id_)
|
|
|
|
html_custom_attrs += f'data-toggle="tooltip" title="{id_}"'
|
|
|
|
|
|
|
|
|
|
|
|
if css_classes:
|
|
|
|
if css_classes:
|
|
|
|
return '<span class="{css_classes}" {html_custom_attrs}>{html_t}</span>'.format(
|
|
|
|
return f'<span class="{css_classes}" {html_custom_attrs}>{html_t}</span>'
|
|
|
|
css_classes=css_classes,
|
|
|
|
|
|
|
|
html_t=html_t,
|
|
|
|
|
|
|
|
html_custom_attrs=html_custom_attrs,
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
return "{html_t}".format(html_t=html_t)
|
|
|
|
return f"{html_t}"
|
|
|
|
|
|
|
|
|
|
|
|
if isinstance(gt_in, ExtractedText):
|
|
|
|
if isinstance(gt_in, ExtractedText):
|
|
|
|
if not isinstance(ocr_in, ExtractedText):
|
|
|
|
if not isinstance(ocr_in, ExtractedText):
|
|
|
|