% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/topic_modeling.R
\name{calculate_npmi}
\alias{calculate_npmi}
\title{Calculate NPMI for Topic Top-Terms}
\usage{
calculate_npmi(top_terms_list, dfm, top_k = 10, epsilon = 1e-12)
}
\arguments{
\item{top_terms_list}{Named or unnamed list of character vectors, one per topic.}

\item{dfm}{A quanteda dfm providing the reference doc-term frequencies.}

\item{top_k}{Number of top terms per topic to include (default 10).}

\item{epsilon}{Numerical stabilizer (default 1e-12).}
}
\value{
list with \code{mean_npmi} (scalar) and \code{per_topic_npmi} (numeric vector).
}
\description{
NPMI (Normalized Pointwise Mutual Information) measures coherence of top-K
terms per topic using internal document co-occurrence from the supplied DFM
(boolean presence).
}
\concept{topic-modeling}
\keyword{internal}
