% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{run_text_workflow}
\alias{run_text_workflow}
\title{Complete Text Mining Workflow}
\usage{
run_text_workflow(
  dataset_choice,
  file_info = NULL,
  text_input = NULL,
  listed_vars,
  min_char = 2,
  remove_punct = TRUE,
  remove_symbols = TRUE,
  remove_numbers = TRUE,
  remove_url = TRUE,
  detect_compounds = FALSE,
  compound_size = 2:3,
  compound_min_count = 2,
  verbose = TRUE
)
}
\arguments{
\item{dataset_choice}{A character string indicating the dataset choice:
"Upload an Example Dataset", "Upload Your File", "Copy and Paste Text".}

\item{file_info}{A data frame containing file information (for file upload).}

\item{text_input}{A character string containing text input (for copy-paste).}

\item{listed_vars}{A character vector of column names to unite into text.}

\item{min_char}{The minimum number of characters for tokens (default: 2).}

\item{remove_punct}{Logical; remove punctuation (default: TRUE).}

\item{remove_symbols}{Logical; remove symbols (default: TRUE).}

\item{remove_numbers}{Logical; remove numbers (default: TRUE).}

\item{remove_url}{Logical; remove URLs (default: TRUE).}

\item{detect_compounds}{Logical; detect multi-word expressions (default: FALSE).}

\item{compound_size}{Size range for compound detection (default: 2:3).}

\item{compound_min_count}{Minimum count for compounds (default: 2).}

\item{verbose}{Logical; print progress messages (default: TRUE).}
}
\value{
A list containing processed data, tokens, DFM, and metadata.
}
\description{
This function provides a complete text mining workflow that follows the same sequence
as the Shiny application: file processing -> text uniting -> preprocessing ->
DFM creation -> analysis.
It serves as a convenience function for users who want to execute the entire
pipeline programmatically.
}
\examples{
\donttest{
  workflow_result <- TextAnalysisR::run_text_workflow(
    dataset_choice = "Upload an Example Dataset",
    listed_vars = c("title", "keyword", "abstract")
  )
}
if (interactive()) {
  file_info <- data.frame(filepath = "path/to/file.xlsx")
  workflow_result <- TextAnalysisR::run_text_workflow(
    dataset_choice = "Upload Your File",
    file_info = file_info,
    listed_vars = c("column1", "column2")
  )

  workflow_result <- TextAnalysisR::run_text_workflow(
    dataset_choice = "Copy and Paste Text",
    text_input = "Your text content here",
    listed_vars = "text"
  )
}
}
