% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/preprocessing.R
\name{get_available_dfm}
\alias{get_available_dfm}
\title{Get Available Document-Feature Matrix with Fallback}
\usage{
get_available_dfm(
  dfm_lemma = NULL,
  dfm_outcome = NULL,
  dfm_final = NULL,
  dfm_init = NULL
)
}
\arguments{
\item{dfm_lemma}{Optional lemmatized DFM (highest priority)}

\item{dfm_outcome}{Optional preprocessed DFM (medium priority)}

\item{dfm_final}{Optional final processed DFM (medium-low priority)}

\item{dfm_init}{Optional initial DFM (lowest priority)}
}
\value{
The first non-NULL DFM from the priority chain, or NULL if all are NULL
}
\description{
Returns the first non-NULL DFM from a priority fallback chain.
Useful when multiple DFM processing stages exist and the most processed available version is needed.
}
\details{
Priority order (highest to lowest):
\enumerate{
\item dfm_lemma - Lemmatized tokens (most processed)
\item dfm_outcome - Preprocessed tokens
\item dfm_final - Final processed version
\item dfm_init - Initial unprocessed tokens
}
}
\examples{
\donttest{
  dfm1 <- quanteda::dfm(quanteda::tokens("assistive technology supports learning"))
  result <- get_available_dfm(dfm_init = dfm1)
}
}
\concept{preprocessing}
\keyword{internal}
