mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-09-09 17:14:20 +00:00
minor updates
This commit is contained in:
parent
14328f0995
commit
3aa5104dd0
@ -56,9 +56,9 @@ def main():
|
|||||||
transcript_path = lang_dir / "transcript_chars.txt"
|
transcript_path = lang_dir / "transcript_chars.txt"
|
||||||
|
|
||||||
with open(text, "r", encoding="utf-8") as fin:
|
with open(text, "r", encoding="utf-8") as fin:
|
||||||
text_lines = fin.readlines()
|
with open(transcript_path, "w+", encoding="utf-8") as fout:
|
||||||
with open(transcript_path, "w+", encoding="utf-8") as fout:
|
for line in fin:
|
||||||
fout.writelines([f"{tokenize_by_CJK_char(line)}\n" for line in text_lines])
|
fout.write(tokenize_by_CJK_char(line) + "\n")
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
@ -353,7 +353,7 @@ if [ $stage -le 14 ] && [ $stop_stage -ge 14 ]; then
|
|||||||
|
|
||||||
if [ -d ../../wenetspeech/ASR/data/lang_char/ ]; then
|
if [ -d ../../wenetspeech/ASR/data/lang_char/ ]; then
|
||||||
cd data
|
cd data
|
||||||
cp -r ../../../../wenetspeech/ASR/data/lm .
|
ln -s ../../../../wenetspeech/ASR/data/lm .
|
||||||
cd ..
|
cd ..
|
||||||
else
|
else
|
||||||
log "Abort! Please run ../../wenetspeech/ASR/prepare.sh"
|
log "Abort! Please run ../../wenetspeech/ASR/prepare.sh"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user