All problems
METEOR Weighted F Mean
Problem
The METEOR-lite score combines precision and recall as a weighted harmonic mean: P R / (alpha P + (1 - alpha) R).
Given alpha, precision, and recall, return the score; return 0.0 when the denominator is zero.
Hint
Recall is weighted more heavily for alpha near one.
Test cases
case 1
in: [0.9,0.8,0.6]
expected: 0.6153846153846153
case 2
in: [0.5,0.5,0.5]
expected: 0.5
case 3
in: [0.9,0,0]
expected: 0
Starter codePython
def meteor_weighted_f_mean(alpha, precision, recall):
# Your code here
pass3 test cases · run your code against them in the editor