% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dict.R
\name{dict_index}
\alias{dict_index}
\title{Compile a MeCab user dictionary}
\usage{
dict_index(
  dic_csv,
  out_dic,
  dic_dir,
  dic_charset = "utf-8",
  out_charset = "utf-8"
)
}
\arguments{
\item{dic_csv}{Character scalar. Path to the user dictionary CSV file(s).
Multiple CSV files can be provided as a character vector.}

\item{out_dic}{Character scalar. Path for the output compiled dictionary file.}

\item{dic_dir}{Character scalar. Path to the system dictionary directory.
This is required so that MeCab can reference the system dictionary
configuration during compilation.}

\item{dic_charset}{Character scalar. Charset of the input CSV file.
Default is \code{"utf-8"}.}

\item{out_charset}{Character scalar. Charset of the output dictionary.
Default is \code{"utf-8"}.}
}
\value{
Invisible \code{TRUE} on success.
}
\description{
\code{dict_index} compiles a user dictionary CSV file into a binary
dictionary that can be used with \code{pos} and \code{posParallel}.
}
\details{
This function wraps MeCab's \code{mecab-dict-index} internally, so you
do not need the command-line tool installed separately.
}
\examples{
\dontrun{
dict_index(
  dic_csv = "user_words.csv",
  out_dic = "user.dic",
  dic_dir = "/usr/local/lib/mecab/dic/ipadic"
)

# Then use the compiled dictionary:
pos("some text", user_dic = "user.dic")
}

}
