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

新增是否开启HMM功能的参数. #31

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

datochan
Copy link

@datochan datochan commented Apr 29, 2016

分词时可以指定是否开启HMM来识别新词。

@piaolingxue
Copy link
Contributor

@datochan 感谢提交 pr,有个建议,新加个接口吧,不要在老接口基础上改,相同的代码可以再提取一个方法出来。

public List<SegToken> process(String paragraph, SegMode mode) {
      sentenceProcess(paragraph, mode, true);
}

// no HMM
public List<SegToken> simpleProcess(String paragraph, SegMode mode) {
      sentenceProcess(paragraph, mode, false);
}

public List<SegToken> sentenceProcess(String paragraph, SegMode mode, Boolean useHMM) {
...
}

@datochan
Copy link
Author

datochan commented Nov 9, 2016

已重新提交PR,本人新手一枚,又是第一次提交PR,还望能好好检查一下,免得因我的错误给您造成麻烦。

@bo-io-gov-mo
Copy link

請問現在HMM默認是開啟嗎?

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

Successfully merging this pull request may close these issues.

3 participants