Simple utility to turn swipes into words -- "plugin" for wvkbd to enable swipe-typing under wayland SXMO.
Revert "map scoring: weight length of word"
This reverts commit b2eed7eee4f4730b458bfd3bac285363dd15b938.
Zach DeCook 2022-01-24
parent 7e4bb43 · commit 09a8e79
-rwxr-xr-xmapScore.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/mapScore.py b/mapScore.py
index 154142f..61a5259 100755
--- a/mapScore.py
+++ b/mapScore.py
@@ -21,10 +21,9 @@ def scoreWord(word,mm):
pc=word[0] or ' '
s=0
for c in word:
- #manhattan dist * 10
- s+=abs(mm[ord(pc)][0]-mm[ord(c)][0])*10
- s+=abs(mm[ord(pc)][1]-mm[ord(c)][1])*10
- s+=1 # longer word bias
+ #manhattan dist
+ s+=abs(mm[ord(pc)][0]-mm[ord(c)][0])
+ s+=abs(mm[ord(pc)][1]-mm[ord(c)][1])
pc=c
return s