diff options
| author | yum <yum.food.vr@gmail.com> | 2022-11-22 15:36:19 -0800 |
|---|---|---|
| committer | yum <yum.food.vr@gmail.com> | 2022-11-22 18:13:18 -0800 |
| commit | bd8b63a357bb374f5875f0fedf2d677589419810 (patch) | |
| tree | 0bb804459ebb7ad50e2a817bd842afd946339b30 /string_matcher.py | |
| parent | 27a67666c320bed3b4a18e415eb9702b03f8f0b5 (diff) | |
Rework input controls
Press joystick once to start recording, again to stop. When you start
recording, any previous text on the board is cleared.
Add 2 visual indicators: one to indicate speech, another to indicate
that audio is paging.
Diffstat (limited to 'string_matcher.py')
| -rw-r--r-- | string_matcher.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/string_matcher.py b/string_matcher.py index 543b18f..461f180 100644 --- a/string_matcher.py +++ b/string_matcher.py @@ -78,7 +78,7 @@ def matchStrings(old_text: str, new_text: str, window_size = 3) -> str: for j in range(0, 1 + len(new_text) - window_size): new_slice = new_text[j:j + window_size] cur_d = editdistance.eval(old_slice, new_slice) - if cur_d <= best_match_d: + if cur_d < best_match_d: best_match_i = i best_match_j = j best_match_d = cur_d |
