HTR reports the cumulative ratio of hapax legomena (one-off words) to the cumulative size of a text. This operation can be slow.
See also
Other vectorized functions:
get_cumulative_vocabulary()
,
get_frequency()
,
get_hir()
,
get_idf_by()
,
get_match()
,
get_sentiment()
,
get_tf_by()
,
get_tfidf_by()
,
get_ttr()
,
is_hapax()
,
is_new()
Examples
c("cat", "dog", "dog", "bat", "dog") |>
get_htr()
#> [1] 1.0000000 1.0000000 0.3333333 0.5000000 0.4000000