生成G.fst步骤报错:\data\ section missing or empty.

本文详细介绍如何使用SRILM工具包训练ARPA模型,包括命令行参数解释、模型修剪及测试模型困惑度的方法。同时,针对训练过程中可能出现的错误提供了解决方案。

Training an ARPA model with SRILM

Training a model with the SRI Language Modeling Toolkit (SRILM) is easy. That’s why we recommend it. Moreover, SRILM is the most advanced toolkit up to date. To train a model you can use the following command:

ngram-count -kndiscount -interpolate -text train-text.txt -lm your.lm

You can prune the model afterwards to reduce the size of the model:

ngram -lm your.lm -prune 1e-8 -write-lm your-pruned.lm

After training it is worth it to test the perplexity of the model on the test data:

ngram -lm your.lm -ppl test-text.txt

ERROR (arpa2fst[5.2.2~1393-a57ea]:Read():arpa-file-parser.cc:129) line 1 []: \data\ section missing or empty.

解决办法:

gzip your.lm 压缩your.lm 。然后使用your.lm.gz生成G.fst

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值