mmseg4j 分词速度

看一下 mmseg4j 的分词速度如何,下载了两篇长篇小说共2.5M左右,可以到 [url]http://mmseg4j.googlecode.com/files/txt.zip[/url]。2.5M的数据,用Complex模式是 5.3秒左右,不知是快还是慢(因为没有对比),Simple 模式用了2.9秒。(AMD athlon 64 2800+ 1G内存 xp)

以上数据是在 eclipse 上运行

代码有两个版本:用Analyzer方式的和不依赖Lucene Analyzer方式的,前者比较简洁

可以到 svn 上看:[url]http://mmseg4j.googlecode.com/svn/trunk/example/com/chenlb/mmseg4j/example/[/url],源码。


命令行运行, txt 是*.txt 的目录:
M:\eclipse 3.3.2\workspace\mmseg4j>java -cp bin -Djava.ext.dirs=lib com.chenlb.mmseg4j.example.PerformanceAnalyzer txt

load dic use time=859ms
use 4921ms

simple 模式
M:\eclipse 3.3.2\workspace\mmseg4j>java -cp bin -Djava.ext.dirs=lib -Dmode=simple com.chenlb.mmseg4j.example.PerformanceAnalyzer txt

load dic use time=547ms
use 2421ms

mmseg4j 项目地址 [url]http://code.google.com/p/mmseg4j/[/url]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值