Skip to contents

BLEU clipped n-gram precision (Kamath Eq 8.2)

Usage

morie_kamath_ch8_bleu_precision(n_grams)

Arguments

n_grams

Matrix or vector of [clipped_matches, total_generated].

Value

List with estimate, p_n.

Examples

V <- c(1, 2, 3, 4, 5, 6, 7, 8)
morie_kamath_ch8_bleu_precision(V)
#> $estimate
#> [1] 0.5000000 0.7500000 0.8333333 0.8750000
#> 
#> $p_n
#> [1] 0.5000000 0.7500000 0.8333333 0.8750000
#> 
#> $n
#> [1] 4
#> 
#> $method
#> [1] "BLEU clipped n-gram precision (Kamath Eq 8.2)"
#>