mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
reduce false positives in dehyphenate
This commit is contained in:
parent
2ae92d4128
commit
260484f515
@ -201,7 +201,7 @@ class Dehyphenator(object):
|
|||||||
lookupword = self.removesuffixes.sub('', dehyphenated)
|
lookupword = self.removesuffixes.sub('', dehyphenated)
|
||||||
else:
|
else:
|
||||||
lookupword = dehyphenated
|
lookupword = dehyphenated
|
||||||
if len(firsthalf) > 3 and self.prefixes.match(firsthalf) is None:
|
if len(firsthalf) > 4 and self.prefixes.match(firsthalf) is None:
|
||||||
lookupword = self.removeprefix.sub('', lookupword)
|
lookupword = self.removeprefix.sub('', lookupword)
|
||||||
if self.verbose > 2:
|
if self.verbose > 2:
|
||||||
self.log("lookup word is: "+str(lookupword)+", orig is: " + str(hyphenated))
|
self.log("lookup word is: "+str(lookupword)+", orig is: " + str(hyphenated))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user