diff options
Diffstat (limited to 'Scripts/string_matcher.py')
| -rw-r--r-- | Scripts/string_matcher.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Scripts/string_matcher.py b/Scripts/string_matcher.py index 26241f2..a56308a 100644 --- a/Scripts/string_matcher.py +++ b/Scripts/string_matcher.py @@ -55,6 +55,10 @@ def matchStrings(old_text: str, new_text: str, window_size = 3) -> str: if DEBUG: print("STRING MATCH exception path 1") return old_text + elif len(new_text) == 0: + return old_text + elif len(old_text) == 0: + return new_text elif len(old_text) >= window_size and len(new_text) >= window_size: # Find the window where the cumulative string distance # between the text in that window in the old/new transcription |
