reduce false positives in dehyphenate

This commit is contained in:
ldolse 2011-01-20 10:06:28 +08:00
parent 2ae92d4128
commit 260484f515

View File

@ -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))