
MoverScore n-gram embedding (Kamath Eq 8.12)
Source:R/kamath_llm2_native.R
morie_kamath_ch8_ngram_embedding.RdSum of idf over the n tokens of one window. i is a 0-BASED start.
Examples
morie_kamath_ch8_ngram_embedding(x = c(1, 2, 3, 4, 5, 6, 7, 8), i = 5L, n = 3L)
#> $estimate
#> [1] 21
#>
#> $embedding
#> [1] 21
#>
#> $window
#> [1] 6 7 8
#>
#> $i
#> [1] 5
#>
#> $n
#> [1] 3
#>
#> $method
#> [1] "MoverScore n-gram embedding (Kamath Eq 8.12)"
#>