% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{merge_segments}
\alias{merge_segments}
\title{Merges segments according to minimum segment size}
\usage{
merge_segments(dtm, min_segment_size = 10, doc_id = NULL)
}
\arguments{
\item{dtm}{dtm of segments}

\item{min_segment_size}{minimum number of forms by segment}

\item{doc_id}{character name of a dtm docvar which identifies source documents.}
}
\value{
the original dtm with a new \code{rainette_uc_id} docvar.
}
\description{
\code{rainette_uc_index} docvar
}
\details{
If \code{min_segment_size == 0}, no segments are merged together.
If \code{min_segment_size > 0} then \code{doc_id} must be provided
unless the corpus comes from \code{split_segments}, in this case
\code{segment_source} is used by default.
}
