MSTTR
.segment.optimizer(txtlgth, segment = 100, range = 20,
favour.min = TRUE)
segment
to search for better fitting sizes. Starting with a given text length, segment size and range
to investigate, segment.optimizer
iterates through
possible segment values. It returns the segment size
which would drop the fewest tokens (zero, if you're
lucky). Should more than one value fulfill this demand,
the one nearest to the segment start value is taken. In
cases, where still two values are equally far away from
the start value, it depends on the setting of
favour.min
if the smaller or larger segment size
is returned.
lex.div
,
MSTTR
segment.optimizer(2014, favour.min=FALSE)
Run the code above in your browser using DataLab