% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/lexical_analysis.R
\name{plot_word_frequency}
\alias{plot_word_frequency}
\title{Plot Word Frequency}
\usage{
plot_word_frequency(dfm_object, n = 20, height = NULL, width = NULL, ...)
}
\arguments{
\item{dfm_object}{A document-feature matrix created by quanteda::dfm().}

\item{n}{The number of top words to display (default: 20).}

\item{height}{Plot height in pixels (default: 800). Kept for backward compatibility.}

\item{width}{Plot width in pixels (default: 1000). Kept for backward compatibility.}

\item{...}{Additional arguments (kept for backward compatibility).}
}
\value{
A ggplot object showing word frequency.
}
\description{
Creates a bar plot showing the most frequent words in a document-feature matrix (dfm).
}
\examples{
\donttest{
  data(SpecialEduTech, package = "TextAnalysisR")
  texts <- SpecialEduTech$abstract[1:10]
  dfm <- quanteda::dfm(quanteda::tokens(texts))
  plot <- plot_word_frequency(dfm, n = 10)
  print(plot)
}
}
\concept{visualization}
