A Toolkit For Langugae Modeling——SRILM使用记录

本文详细介绍了SRILM工具包的使用,包括利用ngram-count模块进行计数和构建语言模型,以及ngram模块评估测试集的困惑度。通过具体命令行示例,展示了从计数文件生成语言模型以及计算测试集困惑度的过程。
摘要由CSDN通过智能技术生成


参考:


SRILM安装:http://blog.csdn.net/zhoubl668/article/details/7759370

SRILM使用:http://hi.baidu.com/keyever/item/8fad8918b90b8e6b3f87ce87

文献:SRILM - An Extensible Language Modeling Toolkit(点此阅读)


更有兴趣的可以参考:


SRILM源码框架分析:http://download.csdn.net/download/yqzhao/4546985

SRILM源码阅读系列:http://blog.chinaunix.net/uid/20658401/cid-67529-list-1.html

SRILM打折算法:http://www.speech.sri.com/projects/srilm/manpages/ngram-discount.7.html



两个核心模块


SRILM工具包的有两个核心模块,一个是利用训练数据构建语言模型,是ngram-count模块,另一个是对语言模型进评测(计算测试集困惑度),是ngram模块。




. ngram-count



对于ngram-count模块,有很多的计数功能,可以单独生成训练语料的计数文件,然后可以读取计数文件构建语言模型,也可以两步一起做。


假设语料库的名字是train.data,如下:


it 's just down the hall . I 'll bring you some now . if there is anything else you need , just let me know .

No worry about that . I 'll take it and you need not wrap it up .

Do you do alterations ?

the light was red .

we want to have a table near the window .

it 's over there , just in front of the tourist information .

I twisted it playing tennis . it felt Okay after the game but then it started turning black - and - blue . is it serious ?

please input your pin number .

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值