Spaces:
Sleeping
Sleeping
Eason Lu
commited on
Commit
·
100bec7
1
Parent(s):
a94e85f
add dict_freq
Browse filesFormer-commit-id: 92dacb7632afc1470ec85fcf425aa3ff57188034
- SRT.py +5 -0
- finetune_data/dict_freq.txt +2 -1
SRT.py
CHANGED
@@ -405,6 +405,11 @@ class SRT_script():
|
|
405 |
if (" " in matched and " " in word) or (" " not in matched and " " not in word):
|
406 |
if enchant.utils.levenshtein(word, matched)<enchant.utils.levenshtein(word, temp):
|
407 |
temp = matched
|
|
|
|
|
|
|
|
|
|
|
408 |
if enchant.utils.levenshtein(word, temp) < threshold:
|
409 |
distance = enchant.utils.levenshtein(word, temp)
|
410 |
result = temp
|
|
|
405 |
if (" " in matched and " " in word) or (" " not in matched and " " not in word):
|
406 |
if enchant.utils.levenshtein(word, matched)<enchant.utils.levenshtein(word, temp):
|
407 |
temp = matched
|
408 |
+
if word == "pull first":
|
409 |
+
print(temp)
|
410 |
+
print(enchant.utils.levenshtein(word, temp))
|
411 |
+
print(threshold)
|
412 |
+
exit()
|
413 |
if enchant.utils.levenshtein(word, temp) < threshold:
|
414 |
distance = enchant.utils.levenshtein(word, temp)
|
415 |
result = temp
|
finetune_data/dict_freq.txt
CHANGED
@@ -195,4 +195,5 @@ APM
|
|
195 |
cheese
|
196 |
gas geyser
|
197 |
stasis ward
|
198 |
-
worm
|
|
|
|
195 |
cheese
|
196 |
gas geyser
|
197 |
stasis ward
|
198 |
+
worm
|
199 |
+
pool first
|