remove existing annotation below the line level to avoid inconsistency

fix/readme-no-checkpoint
Robert Sachunsky 5 years ago committed by Gerber, Mike
parent 2f87ae662d
commit 103b1d7671

@ -77,8 +77,14 @@ class CalamariRecognize(Processor):
line_text = prediction.sentence
line_conf = prediction.avg_char_probability
if line.get_TextEquiv():
log.warning("Line '%s' already contained text results", line.id)
line.set_TextEquiv([TextEquivType(Unicode=line_text, conf=line_conf)])
if line.get_Word():
log.warning("Line '%s' already contained word segmentation", line.id)
line.set_Word([])
_page_update_higher_textequiv_levels('line', pcgts)
file_id = self._make_file_id(input_file, n)

Loading…
Cancel
Save