
MoverScore n-gram distance and Sentence Mover's Distance (Eq 8.11, 8.14)
Source:R/kamath_llm2_native.R
morie_kamath_ch8_moverscore_distance.RdMoverScore n-gram distance and Sentence Mover's Distance (Eq 8.11, 8.14)
Details
One L2 distance serves both Python modules exactly as km126
calls km123: km123 -> morie_kamath_ch8_moverscore_distance, km126 ->
morie_kamath_ch8_smd.
Examples
V <- c(1, 2, 3, 4, 5, 6, 7, 8)
morie_kamath_ch8_moverscore_distance(V, V)
#> $estimate
#> [1] 0
#>
#> $difference
#> [1] 0 0 0 0 0 0 0 0
#>
#> $n
#> [1] 8
#>
#> $method
#> [1] "MoverScore Euclidean n-gram distance (Kamath Eq 8.11)"
#>