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
Original issue reported on code.google.com by
frederic...@gmail.com
on 10 May 2010 at 5:31