% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/preprocessing.R
\name{get_available_tokens}
\alias{get_available_tokens}
\title{Get Available Tokens with Fallback}
\usage{
get_available_tokens(
  final_tokens = NULL,
  processed_tokens = NULL,
  preprocessed_tokens = NULL,
  united_tbl = NULL
)
}
\arguments{
\item{final_tokens}{Optional fully processed tokens (highest priority)}

\item{processed_tokens}{Optional partially processed tokens}

\item{preprocessed_tokens}{Optional early-stage preprocessed tokens}

\item{united_tbl}{Optional data frame with united_texts column (lowest priority, will be tokenized)}
}
\value{
The first non-NULL tokens from the priority chain, or NULL if all are NULL
}
\description{
Returns the first non-NULL tokens object from a priority fallback chain.
Useful when multiple token processing stages exist and the most processed available version is needed.
}
\details{
Priority order (highest to lowest):
\enumerate{
\item final_tokens - Fully processed tokens
\item processed_tokens - Partially processed tokens
\item preprocessed_tokens - Early stage preprocessed tokens
\item united_tbl - Raw text (will be tokenized if used)
}
}
\examples{
\donttest{
  toks <- quanteda::tokens("assistive technology supports learning")
  result <- get_available_tokens(processed_tokens = toks)
}
}
\concept{preprocessing}
\keyword{internal}
