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

Extend MeCab plug-in to support morpheme n-gram #1054

Closed
kmaehashi opened this issue Oct 7, 2015 · 2 comments
Closed

Extend MeCab plug-in to support morpheme n-gram #1054

kmaehashi opened this issue Oct 7, 2015 · 2 comments
Assignees
Milestone

Comments

@kmaehashi
Copy link
Member

Currently MeCab plugin just splits the input string and use surface of each morpheme as a feature.
It is better to support morpheme n-gram to extract the context of the natural language.

I'm thinking of adding a new "ngram" parameter (which is optional and defaults to 1) to the mecab plug-in configuration as follows:

"string_types": {
  "mecab": {
    "method": "dynamic",
    "path": "libmecab_splitter.so",
    "function": "create",
    "arg": "-d /usr/lib64/mecab/dic/ipadic",
    "ngram": 2
  }
}

For instance, when 本日は晴天 is given as an input, {"本日", "は", "晴天"} is extracted when "ngram" is 1, whereas {"本日|は", "は|晴天"} is extracted when "ngram" is 2.

@kmaehashi
Copy link
Member Author

Updated docs for this: jubatus/website#236

TkrUdagawa added a commit that referenced this issue Dec 18, 2015
support morpheme n-gram in mecab plugin (fix #1054)
@kmaehashi
Copy link
Member Author

Fixed via #1070

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