download_dic: Download and install a MeCab dictionary

View source: R/dic.R

download_dicR Documentation

Download and install a MeCab dictionary

Description

Downloads and installs a MeCab system dictionary for the specified language. Japanese and Chinese dictionaries are compiled from source using the built-in mecab-dict-index; Korean dictionaries are downloaded pre-compiled. No system-level MeCab installation is required.

Usage

download_dic(lang)

Arguments

lang

Character scalar. Language code: "ja" for Japanese (IPAdic), "ko" for Korean (mecab-ko-dic), or "zh" for Chinese (mecab-jieba).

Details

Dictionaries are stored in the user data directory (tools::R_user_dir("RcppMeCab", "data")).

Value

Invisible path to the installed dictionary directory.

Examples

## Not run: 
download_dic("ja")
download_dic("ko")
download_dic("zh")
pos("some text", lang = "ja")

## End(Not run)


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