Nov11 / ik-analyzer

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

使用IKQueryParser的时候,不能指定分词器使用最大词长切分法, #11

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
目前的IKQueryParser的_parse方法,使用了如下代码:
IKSegmentation ikSeg = new IKSegmentation(input); //version 3.2,line 118
它默认使用了最细粒度切分,但是没有提供途径让用户修改��
�词算法。

What is the expected output? What do you see instead?
建议给IKQueryParser类增加一个static方法允许设置分词算法使用�
��大词长切分法还
是最细粒度切分法,如果不指定,默认使用最细粒度切分法��
�
private static boolean isMaxWordLength = false;

public static boolean setMaxWordLength(boolean isMaxWordLength ) {
    isMaxWordLength = isMaxWordLength ;
}

然后,118行代码改成
IKSegmentation ikSeg = new IKSegmentation(input, isMaxWordLength );

What version of the product are you using? On what operating system?
3.2.0Stable

Please provide any additional information below.

Original issue reported on code.google.com by frederic...@gmail.com on 10 May 2010 at 5:31

GoogleCodeExporter commented 8 years ago
感谢您的意见,我们会在后面的版本中修订这个问题。

Original comment by linliang...@gmail.com on 14 May 2010 at 4:03

GoogleCodeExporter commented 8 years ago
问题已修订,详见版本更新记录

Original comment by linliang...@gmail.com on 14 May 2010 at 4:23