% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/extendr-wrappers.R
\name{new_worker}
\alias{new_worker}
\title{Create an internal native jieba worker.}
\usage{
new_worker(
  worker_type,
  use_hmm,
  hmm_model,
  idf_path,
  dict_path,
  user_paths,
  top_n,
  min_keyword_length,
  stop_words
)
}
\arguments{
\item{worker_type}{Character scalar naming the worker type. Currently
supports \code{"mix"}, \code{"mp"}, \code{"hmm"}, \code{"full"}, \code{"query"}, \code{"tag"},
\code{"keywords"}, and \code{"textrank"}.}

\item{use_hmm}{Logical scalar indicating whether HMM fallback should be
enabled for segmentation.}

\item{hmm_model}{Character scalar containing a custom HMM model path, or an
empty string to use the embedded model.}

\item{idf_path}{Character scalar containing a custom IDF dictionary path, or
an empty string to use the embedded dictionary.}

\item{dict_path}{Character scalar containing a custom main dictionary path,
or an empty string to use the embedded dictionary. When provided, the
custom file \emph{replaces} the embedded main dictionary entirely.}

\item{user_paths}{Character vector containing user dictionary paths. User
entries are \emph{appended} to the main dictionary in the supplied order.}

\item{top_n}{Integer scalar giving the number of keywords retained by
keyword workers.}

\item{min_keyword_length}{Positive integer scalar giving the minimum number
of Unicode scalar values in terms retained by keyword workers.}

\item{stop_words}{Character vector of normalized UTF-8 stop words passed to
the native worker.}
}
\value{
A native \code{JiebaWorker} handle.
}
\description{
Internal bridge used by \code{\link[=worker]{worker()}} to allocate a native \code{JiebaWorker}.
}
\keyword{internal}
