Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
GoogleCodeExporter opened this issue Nov 14, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

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
Copy link
Author

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

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

@GoogleCodeExporter
Copy link
Author

问题已修订,详见版本更新记录

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

  • Changed state: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant