Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
DeepSpeech
提交
233247d4
D
DeepSpeech
项目概览
PaddlePaddle
/
DeepSpeech
大约 2 年 前同步成功
通知
210
Star
8425
Fork
1598
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
245
列表
看板
标记
里程碑
合并请求
3
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
DeepSpeech
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
245
Issue
245
列表
看板
标记
里程碑
合并请求
3
合并请求
3
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
233247d4
编写于
4月 20, 2022
作者:
H
Hui Zhang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
parallel sort
上级
54376f5d
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
3 addition
and
3 deletion
+3
-3
speechx/examples/ngram/zh/local/aishell_train_lms.sh
speechx/examples/ngram/zh/local/aishell_train_lms.sh
+3
-3
speechx/examples/ngram/zh/local/split_data.sh
speechx/examples/ngram/zh/local/split_data.sh
+0
-0
未找到文件。
speechx/examples/ngram/zh/local/aishell_train_lms.sh
浏览文件 @
233247d4
...
...
@@ -44,15 +44,15 @@ cat ${text_dir}/split${nj}/*/${split_name}.no_oov > $cleantext
# compute word counts, sort in descending order
# line: count word
cat
$cleantext
|
awk
'{for(n=2;n<=NF;n++) print $n; }'
|
sort
|
uniq
-c
|
\
sort
-nr
>
$dir
/word.counts
||
exit
1
;
cat
$cleantext
|
awk
'{for(n=2;n<=NF;n++) print $n; }'
|
sort
--parallel
=
`
nproc
`
|
uniq
-c
|
\
sort
-
-parallel
=
`
nproc
`
-
nr
>
$dir
/word.counts
||
exit
1
;
# Get counts from acoustic training transcripts, and add one-count
# for each word in the lexicon (but not silence, we don't want it
# in the LM-- we'll add it optionally later).
cat
$cleantext
|
awk
'{for(n=2;n<=NF;n++) print $n; }'
|
\
cat
- <
(
grep
-w
-v
'!SIL'
$lexicon
|
awk
'{print $1}'
)
|
\
sort
|
uniq
-c
|
sort
-nr
>
$dir
/unigram.counts
||
exit
1
;
sort
--parallel
=
`
nproc
`
|
uniq
-c
|
sort
--parallel
=
`
nproc
`
-nr
>
$dir
/unigram.counts
||
exit
1
;
# word with <s> </s>
cat
$dir
/unigram.counts |
awk
'{print $2}'
|
cat
- <
(
echo
"<s>"
;
echo
"</s>"
)
>
$dir
/wordlist
...
...
speechx/examples/ngram/zh/local/split_data.sh
100644 → 100755
浏览文件 @
233247d4
文件模式从 100644 更改为 100755
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录