Increase minimal distance between words.

This commit is contained in:
Andrey Golovizin 2014-08-26 20:23:06 +02:00
parent e3a7d65ef5
commit 9410952111

View file

@ -206,12 +206,12 @@ class Line(PageObject):
if glyph not in bodies: # freestanding diacritic-like glyphacter without a body
yield glyph
def _insert_spaces(self, glyphs):
def _insert_spaces(self, glyphs, min_distance=10):
for glyph, next_glyph in pairwise(glyphs):
yield glyph
if next_glyph is not None:
distance = glyph.optical_distance(next_glyph)
if distance > 5:
if distance >= min_distance:
yield Space(self.image.space(glyph.right, self.top, distance, self.height), self.baseline - self.top)
def _extract_blob(self, blob_slice, label, labels):