diff --git a/pixelocr/page.py b/pixelocr/page.py index 5dcc198..fe99752 100644 --- a/pixelocr/page.py +++ b/pixelocr/page.py @@ -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):