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

User dictionary support #18

Open
DarrenCook opened this issue Jul 14, 2017 · 1 comment
Open

User dictionary support #18

DarrenCook opened this issue Jul 14, 2017 · 1 comment

Comments

@DarrenCook
Copy link

I found the TODO for user dictionaries:
https://github.com/takuyaa/kuromoji.js/blob/master/src/Tokenizer.js#L110

But, comparing to the atilika version of kuromoji, I think the user dictionary code actually needs to go here:
https://github.com/takuyaa/kuromoji.js/blob/master/src/viterbi/ViterbiBuilder.js#L96

Ref: https://github.com/atilika/kuromoji/blob/master/kuromoji-core/src/main/java/com/atilika/kuromoji/viterbi/ViterbiBuilder.java#L101
https://github.com/atilika/kuromoji/blob/master/kuromoji-core/src/main/java/com/atilika/kuromoji/viterbi/ViterbiBuilder.java#L176
https://github.com/atilika/kuromoji/blob/d0700ab6dd489aaf0fcb1e4e78ce2f682be9f255/kuromoji-core/src/main/java/com/atilika/kuromoji/dict/UserDictionary.java#L72

That seems like a fair bit of code - no wonder you skipped over it before! Based on your knowledge of the code, is it all fairly mechanical porting work, or is it going to be hard work?

(Do you have any other ideas for dynamically adding new entries, that don't require recompiling, then reloading, all the dictionary files?)

@weituotian
Copy link

yes , i need it too.

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

No branches or pull requests

2 participants