Computer scienceData scienceNLPNLP metricsClassic NLP metrics

METEOR

Custom METEOR

Report a typo

Complete the provided function to calculate the METEOR score. meteor() accepts the specified set of parameters and should return the final METEOR score, rounded up to the 3rd decimal. Do not make the meteor() function call or print any values.

Parameter description:

  • match_count - the number of mapped unigrams between the reference and the candidate (denoted as mm in the theory);

  • prediction_len, reference_len - the unigram counts in the prediction and in the reference (denoted as cc and rr );

  • chunk_count - the number of matching chunks (denoted as cmc_m in the theory);

  • alpha, beta, gamma - correspond to the α\alpha, β\beta and γ\gamma definitions.

Write a program in Python 3
def meteor(
match_count: int,
prediction_len: int,
reference_len: int,
chunk_count: int,
alpha: float = 0.9,
beta: float = 3.0,
gamma: float = 0.5,
) -> float:
pass
___

Create a free account to access the full topic