spellocorrector: I think I've missed a port to make this funkyness work properly so lets downgrade the optimisation a bit

This commit is contained in:
Mattias Andrée 2014-10-08 04:24:33 +02:00
parent 20b3cac03e
commit 93f481c8a3

View file

@ -239,15 +239,10 @@ class SpelloCorrecter(): # Naïvely and quickly ported and adapted from optimise
while x < xn:
change = my[x]
u = used[x]
if p == u:
# commence black magick … twilight would be so disappointed
x += 1
myy[x] = change
best = min(best, change)
remove = myy[x]
add = my[x + 1]
cw = 1
cw = 0 if p == u else 1
if my[x] in self.weights:
if p in self.weights[u]:
cw = self.weights[u][p]
@ -260,5 +255,6 @@ class SpelloCorrecter(): # Naïvely and quickly ported and adapted from optimise
if best > self.closestDistance:
return 0x7FFFFF00 | y
my = myy
return my[xn]