Learn R Programming

RcppMeCab (version 0.0.1.7)

set_dic: Set the active MeCab dictionary

Description

Sets the default system dictionary used by pos and posParallel. This is equivalent to calling options(mecabSysDic = path) but allows selection by dictionary code. It does not switch the MeCab engine linked into RcppMeCab. Japanese and Chinese dictionaries use standard MeCab; supported Korean behavior requires the mecab-ko engine selected at package installation.

Usage

set_dic(lang)

Value

Invisible path to the activated dictionary directory.

Arguments

lang

Character scalar. Dictionary code ("ja", "ko", or "zh") or "bundled" to use the dictionary bundled with the package.

Examples

Run this code
if (FALSE) {
set_dic("ja")
pos("some Japanese text")

set_dic("zh")
pos("some Chinese text")
}

Run the code above in your browser using DataLab