% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/lexical_analysis.R
\name{detect_multi_words}
\alias{detect_multi_words}
\title{Detect Multi-Word Expressions}
\usage{
detect_multi_words(tokens, size = 2:5, min_count = 2)
}
\arguments{
\item{tokens}{A \code{tokens} object from the \code{quanteda} package.}

\item{size}{A numeric vector specifying the sizes of the collocations to detect (default: 2:5).}

\item{min_count}{The minimum number of occurrences for a collocation to be
considered (default: 2).}
}
\value{
A character vector of detected collocations.
}
\description{
This function detects multi-word expressions (collocations) of specified
sizes that appear at least a specified number of times in the provided tokens.
}
\examples{
\donttest{
  mydata <- TextAnalysisR::SpecialEduTech[seq_len(50), ]

  united_tbl <- TextAnalysisR::unite_cols(
    mydata,
    listed_vars = c("title", "keyword", "abstract")
  )

  tokens <- TextAnalysisR::prep_texts(united_tbl, text_field = "united_texts")

  collocations <- TextAnalysisR::detect_multi_words(tokens, size = 2:3, min_count = 2)
  print(collocations)
}
}
\concept{lexical}
