% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dic.R
\name{download_dic}
\alias{download_dic}
\title{Download and install a MeCab dictionary}
\usage{
download_dic(lang)
}
\arguments{
\item{lang}{Character scalar. Dictionary code: \code{"ja"} for Japanese
(IPAdic), \code{"ko"} for Korean (mecab-ko-dic), or \code{"zh"} for
Chinese (mecab-jieba).}
}
\value{
Invisible path to the installed dictionary directory.
}
\description{
Downloads and installs a MeCab system dictionary for the specified language.
Japanese and Chinese dictionaries are compiled from source using the built-in
\code{mecab-dict-index}; Korean dictionaries are downloaded pre-compiled.
No system-level MeCab installation is required.

Installing a dictionary does not change 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.
}
\details{
Dictionaries are stored in the user data directory
(\code{tools::R_user_dir("RcppMeCab", "data")}).
}
\examples{
\dontrun{
download_dic("ja")
download_dic("ko")
download_dic("zh")
pos("some text", lang = "ja")
}

}
