paoding-analysis-2.0.4-beta是基于lucene-core-2.2.0.jar核心开发的,所以lucene版本至少在2.2以上,目前我使用2.9版本也可以正常使用。
我在使用lucene1.4.3时运行出错。java.lang.VerifyError: trying to subclass final class org/apache/lucene/analysis/Token
应该是继承了final的Tocken引起的!
分词的效果对比:
分词
查看Lucene分词器分词后的结果.The result is perfect.12345!go!
庖丁分词(按字典分并进行辅助词的过滤)
结果 result perfect 12345 go
Standard内置标准分词(按字分)
结 果 result perfect.12345 go
Whitespace(按空格分,不过滤标点)
结果 The result is perfect.12345!go!
Simple(按标点符号和空格分)
结果 the result is perfect go