% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/preprocess.R
\name{preprocess_text}
\alias{preprocess_text}
\title{Normalize text for document-term analysis}
\usage{
preprocess_text(
  text,
  lowercase = TRUE,
  remove_punctuation = TRUE,
  remove_numbers = TRUE,
  stopwords = character(),
  min_token_length = 1L
)
}
\arguments{
\item{text}{Character vector.}

\item{lowercase}{Logical; convert text to lowercase?}

\item{remove_punctuation}{Logical; replace punctuation with spaces?}

\item{remove_numbers}{Logical; replace digits with spaces?}

\item{stopwords}{Optional character vector of words to remove.}

\item{min_token_length}{Minimum number of characters per token.}
}
\value{
A character vector of normalized documents.
}
\description{
Normalize text for document-term analysis
}
\examples{
preprocess_text(
  c("Analyze the data!", "Present 2 reports."),
  stopwords = c("the")
)
}
