diff options
| author | yum <yum.food.vr@gmail.com> | 2022-11-08 00:09:59 -0800 |
|---|---|---|
| committer | yum <yum.food.vr@gmail.com> | 2022-11-08 00:09:59 -0800 |
| commit | 2efc87a7180ec6e92127d22d1a3eb8c44fd392db (patch) | |
| tree | 0c8c6ace7d3b3752cdc67ee98bbb43a9ecec18cd /string_matcher.py | |
| parent | 77c6f366b2f81c60ed67e2fa6dc92df451e4229c (diff) | |
Update fonts
English, Japanese, Chinese, and Korean should look much better now.
French, German, and Spanish look like shit now, because I haven't
figured out how to best make Noto Sans stay within its bounding box.
* Use Noto Sans for most things
* Simplify how we enable unicode blocks & assign fonts to them
* Increase string matching window to 300. Works better in real-world
test.
Diffstat (limited to 'string_matcher.py')
| -rw-r--r-- | string_matcher.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/string_matcher.py b/string_matcher.py index 9060b26..f3284e9 100644 --- a/string_matcher.py +++ b/string_matcher.py @@ -66,7 +66,7 @@ def matchStrings(old_text: str, new_text: str, window_size = 3) -> str: # slice in the old and new transcriptions (O(N^2) time complexity). # This is still wildly inefficient, but good enough for continuous # transcription in a game bound by a single CPU core, like VRChat. - max_old_slices = 50 + max_old_slices = 300 old_n_slices = min(max_old_slices, len(old_text)) last_old_window = len(old_text) - window_size first_old_window = max(last_old_window - old_n_slices, 0) @@ -136,7 +136,7 @@ if __name__ == "__main__": good_out = "This repository contains the code for" assert(matchStrings(in1, in2) == good_out) - in1 = "a" * 10 * 1000 + in1 = "a" * 1000 in2 = "b" * 10 * 1000 # This should be fast (< 1 second) matchStrings(in1, in2) |
