% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/keywords.R
\name{keywords}
\alias{keywords}
\title{Extract keywords from text}
\usage{
keywords(code, jiebar, ..., format = c("vector", "data.frame", "legacy"))
}
\arguments{
\item{code}{A character to analyze.}

\item{jiebar}{A \code{jieba_worker} object created with \code{worker(type = "keywords")}.}

\item{...}{Must be empty. This enforces that optional arguments such as
\code{format} are supplied with explicit names.}

\item{format}{Output format. \code{"vector"} returns a named numeric vector,
\code{"data.frame"} returns a data frame with \code{term} and \code{weight} columns, and
\code{"legacy"} returns the old \code{jiebaR} style character vector with weights in
\code{names()}. Default is \code{"vector"}.}
}
\value{
Keyword results in the requested format.
}
\description{
Extract TF-IDF keywords from a single in-memory string with a keyword worker
created by \code{\link[=worker]{worker()}}. This is separate from \code{\link[=textrank]{textrank()}}, which uses
TextRank weighting.
}
