Fix text splitting when plotting attention maps
Attention maps are not correct when --attention-map-level
is "word"
or "line"
.
This is because our regex match every character that is not \n
(or
for words), but we are currently using
text_split = separators.split(text)
instead of
text_split = separators.findall(text)
in split_text()
(/dan/ocr/predict/attention.py
)