set_dic: Set the active MeCab dictionary by language

View source: R/dic.R

set_dicR Documentation

Set the active MeCab dictionary by language

Description

Sets the default system dictionary used by pos and posParallel. This is equivalent to calling options(mecabSysDic = path) but allows selection by language code.

Usage

set_dic(lang)

Arguments

lang

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

Value

Invisible path to the activated dictionary directory.

Examples

## Not run: 
set_dic("ja")
pos("some Japanese text")

set_dic("ko")
pos("some Korean text")

## End(Not run)


RcppMeCab documentation built on March 24, 2026, 9:08 a.m.