% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dtm.R
\name{document_term_matrix}
\alias{document_term_matrix}
\title{Construct a document-term matrix}
\usage{
document_term_matrix(
  text,
  document_ids = NULL,
  binary = FALSE,
  min_doc_freq = 1L,
  max_doc_prop = 1
)
}
\arguments{
\item{text}{Character vector containing one preprocessed document per item.}

\item{document_ids}{Optional unique document identifiers.}

\item{binary}{Logical; store term presence instead of term frequency?}

\item{min_doc_freq}{Minimum number of documents in which a term must occur.}

\item{max_doc_prop}{Maximum proportion of documents in which a term may
occur.}
}
\value{
A numeric matrix with class \code{text_dtm}.
}
\description{
Construct a document-term matrix
}
\examples{
docs <- preprocess_text(c("data science", "data analysis", "science"))
document_term_matrix(docs)
}
