% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get-idf.R
\name{get_idf}
\alias{get_idf}
\title{Generate IDF dict}
\usage{
get_idf(x, stop_word = NULL, stop_word_file = NULL, path = NULL)
}
\arguments{
\item{x}{a list of character vectors. Each vector represents a document of
already-segmented words.}

\item{stop_word}{Optional character vector of stop words supplied directly.}

\item{stop_word_file}{Optional file path containing one stop word per line.}

\item{path}{Optional output file path. When \code{NULL}, a data frame is returned.
Otherwise, the result is written to the file as \verb{word idf_value} per line
(the format expected by \code{worker(type = "keywords", idf = ...)}) and the
path is returned invisibly.}
}
\value{
A data frame with \code{name} and \code{count} columns, or a file path
(invisibly) when \code{path} is supplied.
}
\description{
Generate IDF dict from a list of documents.
}
\details{
Input list contains multiple character vectors with words,
and each vector represents a document.

Stop words will be removed from the result.

If path is not NULL, it will write the result to the path.
}
\examples{
get_idf(list(c("abc", "def"),c("abc", " ")))
}
