Skip to contents

1 when the candidate is longer than the reference, exp(1 - r/c) otherwise.

Usage

morie_kamath_ch8_brevity_penalty(c, r)

Arguments

c

Candidate length.

r

Reference length.

Value

List with estimate, penalized.

Examples

morie_kamath_ch8_brevity_penalty(5, 7)
#> $estimate
#> [1] 0.67032
#> 
#> $c
#> [1] 5
#> 
#> $r
#> [1] 7
#> 
#> $penalized
#> [1] TRUE
#> 
#> $n
#> [1] 1
#> 
#> $method
#> [1] "BLEU brevity penalty (Kamath Eq 8.4)"
#>