buruzaemon / natto

A Tasty Ruby Binding with MeCab
BSD 2-Clause "Simplified" License
143 stars 16 forks source link

MeCab option support: output marginal probability #5

Closed buruzaemon closed 9 years ago

buruzaemon commented 9 years ago

Add support for new MeCab option -m, --marginal

Reported 2012-02-14. This issue was ported from Bitbucket and is archived for historical reasons.

buruzaemon commented 9 years ago

Status changed 2012-09-15. This issue was ported from Bitbucket and is archived for historical reasons.

buruzaemon commented 9 years ago

Let's do this.

buruzaemon commented 9 years ago

Note that setting MECAB_MARGINAL_PROB for the request type will only affect output when node parsing.

Also note that parsing speed will suffer a 3-5 times decrease than the default mode.

c.f. mecab.h comments at lines 284-286.

buruzaemon commented 9 years ago

--marginal works in concert with --theta, but apparently does not have any affect when using --partial or boundary constraint parsing.

buruzaemon commented 9 years ago

Unit test added. Done and ready for 1.0.0 release.