Leechael / ik-analyzer

Automatically exported from code.google.com/p/ik-analyzer
0 stars 0 forks source link

在运行分词效果测试时,在没有加载Analysis前调用Dictionary.addWords(distinctWords)会发生NullPointException #39

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
说明一下,我需要的效果是在运行期动态的添加词汇(也包括在
初始化时加载指定的词汇)
1. 
在没有初始化之前org.wltea.analyzer.lucene.IKAnalyzer();前调用Dictiona
ry.addWords(Collection<String>);方法时发生NullPointException.
2. 
经过研读代码发现需要在开始前手动的调用Dictionary.getInstance(
new Configuration());
3.我想这也算是一个Bug吧?

对您的辛勤劳动,开元精神表示感谢!

祝您做的更好!

Original issue reported on code.google.com by zhzhen...@gmail.com on 16 Mar 2012 at 12:35

GoogleCodeExporter commented 8 years ago
哦,Sorry!开源,not开元...

Original comment by zhzhen...@gmail.com on 16 Mar 2012 at 12:37

GoogleCodeExporter commented 8 years ago
感谢反馈

Original comment by linliang...@gmail.com on 16 Mar 2012 at 1:49

GoogleCodeExporter commented 8 years ago

Original comment by linliang...@gmail.com on 16 Mar 2012 at 2:29