mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-09-08 08:34:19 +00:00
minor fix
This commit is contained in:
parent
6e6a3644c4
commit
c0f2abd2a7
@ -81,13 +81,23 @@ def asr_text_post_processing(text: str) -> str:
|
||||
remaining_words.append("H")
|
||||
remaining_words.append("D")
|
||||
continue
|
||||
elif word == "UCLA":
|
||||
remaining_words.append("U")
|
||||
remaining_words.append("C")
|
||||
remaining_words.append("L")
|
||||
remaining_words.append("A")
|
||||
continue
|
||||
elif word == "ONTO":
|
||||
remaining_words.append("ON")
|
||||
remaining_words.append("TO")
|
||||
continue
|
||||
elif word == "DAY" and text_split[idx + 1] == "CARE":
|
||||
remaining_words.append("DAYCARE")
|
||||
word_to_skip = 1
|
||||
elif word == "DAY":
|
||||
try:
|
||||
if text_split[idx + 1] == "CARE":
|
||||
remaining_words.append("DAYCARE")
|
||||
word_to_skip = 1
|
||||
except:
|
||||
remaining_words.append(word)
|
||||
continue
|
||||
remaining_words.append(word)
|
||||
|
||||
|
@ -81,6 +81,12 @@ def asr_text_post_processing(text: str) -> str:
|
||||
remaining_words.append("H")
|
||||
remaining_words.append("D")
|
||||
continue
|
||||
elif word == "UCLA":
|
||||
remaining_words.append("U")
|
||||
remaining_words.append("C")
|
||||
remaining_words.append("L")
|
||||
remaining_words.append("A")
|
||||
continue
|
||||
elif word == "ONTO":
|
||||
remaining_words.append("ON")
|
||||
remaining_words.append("TO")
|
||||
|
@ -76,7 +76,9 @@ def save_checkpoint(
|
||||
|
||||
if isinstance(model, DDP):
|
||||
model = model.module
|
||||
# import pdb
|
||||
|
||||
# pdb.set_trace()
|
||||
checkpoint = {
|
||||
"model": model.state_dict(),
|
||||
"optimizer": optimizer.state_dict() if optimizer is not None else None,
|
||||
|
Loading…
x
Reference in New Issue
Block a user