Increase minimal distance between words.
This commit is contained in:
parent
e3a7d65ef5
commit
9410952111
1 changed files with 2 additions and 2 deletions
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue