ITeye博客

mmseg4j 分词速度

chenlb · 2009-03-28 17:03 · mmseg4j · 企业架构 · Markdown

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

以上数据是在 eclipse 上运行

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

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

命令行运行, 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 项目地址 http://code.google.com/p/mmseg4j/

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。