Skip to contents

Clipped reference n-gram overlap divided by the reference n-gram total.

Usage

morie_kamath_ch8_rouge_n(S, gram_n, candidate = NULL)

Arguments

S

List of reference token SEQUENCES.

gram_n

Order.

candidate

Generated token sequence.

Value

List with estimate, matched, total_reference_ngrams.

Examples

morie_kamath_ch8_rouge_n(list(c("a", "b", "c"), c("a", "b", "d")),
    2, candidate = c("a", "b", "c", "a"))
#> $estimate
#> [1] 0.75
#> 
#> $matched
#> [1] 3
#> 
#> $total_reference_ngrams
#> [1] 4
#> 
#> $gram_n
#> [1] 2
#> 
#> $n
#> [1] 2
#> 
#> $method
#> [1] "ROUGE-2 recall (Kamath Eq 8.6)"
#>