knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" ) pkgload::load_all()
rJava Interface to CMeCab
rjavacmecab is an rJava interface to takscape/cmecab-java that is a Java binding for MeCab.
The goal of this package is to provide the simplest way to help use 'MeCab' from R than alternatives (RMeCab and RcppMeCab).
rjavacmecab is yet slower, but it should be easier to use because...
rjavacmecab requires 'MeCab' (mecab, libmecab-dev and mecab-ipadic-utf8) and JDK. Please note that they are installed and available before you use rjavacmecab.
In case using base R and JDK for 32/64bit under Windows, you need 32/64bit build of libmecab.
remotes::install_github("paithiov909/rjavacmecab")
To make cmecab tagger available, rebuild_tagger
at first.
rjavacmecab::rebuild_tagger() res <- rjavacmecab::cmecab(c("長期的自己実現で福楽は得られない", "幸せは刹那の中にあり")) str(res)
res <- rjavacmecab::prettify(res) str(res)
If you use IPA-styled dictionary, the output has these columns.
res <- rjavacmecab::pack(res) print(res)
Igo is a pure Java port of MeCab. rjavacmecab also provides a wrapper function of that.
res <- rjavacmecab::igo("お前がそう思うんならそうなんだろう、お前ん中ではな") str(res)
BSD 3-clause License.
This software includes works that are distributed in Public Domain and New BSD License. See https://github.com/takscape/cmecab-java/blob/master/README.txt for more details.
Icons made by Vectors Market from Flaticon.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.