Computes the Average Word Length (AWL) and Type-Token Ratio (TTR) of a vector of words.
Arguments
- vec
The vector of words for which to compute AWL and TTR.
- ttr
The number of words to consider for TTR calculation. Default is 400.
Examples
add_awl_ttr(c("Hello world", "This is R"))
#> # A tibble: 1 × 2
#> AWL TTR
#> <dbl> <dbl>
#> 1 NaN Inf