Skip to contents

Clipped n-gram matches / reference n-grams, with precision and F1.

Usage

morie_kamath_rouge_n(hypothesis, reference, n = 1)

Arguments

hypothesis, reference

Token vectors or whitespace strings.

n

Order.

Value

List with estimate (recall), precision, f1, n_matched.

Examples

V <- c(1, 2, 3, 4, 5, 6, 7, 8)
morie_kamath_rouge_n(V, V)
#> $estimate
#> [1] 1
#> 
#> $recall
#> [1] 1
#> 
#> $precision
#> [1] 1
#> 
#> $f1
#> [1] 1
#> 
#> $n_matched
#> [1] 8
#> 
#> $n_reference_ngrams
#> [1] 8
#> 
#> $n_hypothesis_ngrams
#> [1] 8
#> 
#> $order
#> [1] 1
#> 
#> $n
#> [1] 8
#> 
#> $method
#> [1] "ROUGE-1 recall with clipped n-gram counts"
#>