Use optical distance correction when detecting apostrophes.
This commit is contained in:
parent
fac5d738a7
commit
53b27ee883
1 changed files with 2 additions and 2 deletions
|
|
@ -93,7 +93,7 @@ class Page(PageObject):
|
|||
@cached_property
|
||||
@collect_iterable
|
||||
def lines(self):
|
||||
for line_img in self.image._iter_lines(min_space=2):
|
||||
for line_img in self.image._iter_lines(min_space=2, min_height=10):
|
||||
yield Line(line_img)
|
||||
|
||||
|
||||
|
|
@ -226,7 +226,7 @@ class Glyph(PageObject):
|
|||
self.top - 5,
|
||||
self.right + 5,
|
||||
self.top + 10,
|
||||
) and glyph.height > 3:
|
||||
) and glyph.height > 3 and self.optical_distance(glyph) < 4:
|
||||
return True
|
||||
|
||||
# dot in ? and !
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue