Eason Lu commited on
Commit
970cf06
·
1 Parent(s): 92d2ddc

update dict_freq

Browse files

Former-commit-id: 525cf6178be3f993dfab46f4dbf37e3272f6408b

Files changed (2) hide show
  1. SRT.py +3 -3
  2. finetune_data/dict_freq.txt +2 -2
SRT.py CHANGED
@@ -406,8 +406,8 @@ class SRT_script():
406
 
407
  def extract_words(self, sentence, n):
408
  # this function split the sentence to chunks by n of words
409
- # e.g. sentence: "this is a sentence", n = 2
410
- # result: ["this", "is", "a", "sentence", "this is", "is a", "a sentence"]
411
  words = sentence.split()
412
  res = []
413
  for j in range(1, n+1):
@@ -436,7 +436,7 @@ class SRT_script():
436
  word = ""
437
  for w in word_list:
438
  word += f"{w} "
439
- word = word[:-1]
440
  if word[-2:] == ".\n":
441
  real_word = word[:-2].lower()
442
  n = -2
 
406
 
407
  def extract_words(self, sentence, n):
408
  # this function split the sentence to chunks by n of words
409
+ # e.g. sentence: "this, is a sentence", n = 2
410
+ # result: ["this,", "is", "a", ["sentence"], ["this,", "is"], "is a", "a sentence"]
411
  words = sentence.split()
412
  res = []
413
  for j in range(1, n+1):
 
436
  word = ""
437
  for w in word_list:
438
  word += f"{w} "
439
+ word = word[:-1] # "this, is"
440
  if word[-2:] == ".\n":
441
  real_word = word[:-2].lower()
442
  n = -2
finetune_data/dict_freq.txt CHANGED
@@ -23,8 +23,8 @@ gateway
23
  warpgate
24
  immortal
25
  zealot
26
- nydus
27
- worm
28
  hydralisk
29
  grooved spines
30
  muscular augments
 
23
  warpgate
24
  immortal
25
  zealot
26
+ nydus worm
27
+ nydus network
28
  hydralisk
29
  grooved spines
30
  muscular augments