Valutare con METEOR
METEOR è eccellente nel valutare alcune caratteristiche più semantiche del testo. Funziona in modo simile a ROUGE confrontando un output generato dal modello con un output di riferimento. Ti sono stati forniti questi testi come generated e reference; ora tocca a te calcolare il punteggio.
La libreria evaluate è già stata caricata per te.
Questo esercizio fa parte del corso
Introduzione agli LLM in Python
Istruzioni dell'esercizio
- Calcola e stampa il punteggio METEOR.
Esercizio pratico interattivo
Prova a risolvere questo esercizio completando il codice di esempio.
meteor = evaluate.load("meteor")
generated = ["The burrow stretched forward like a narrow corridor for a while, then plunged abruptly downward, so quickly that Alice had no chance to stop herself before she was tumbling into an extremely deep shaft."]
reference = ["The rabbit-hole went straight on like a tunnel for some way, and then dipped suddenly down, so suddenly that Alice had not a moment to think about stopping herself before she found herself falling down a very deep well."]
# Compute and print the METEOR score
results = ____
print("Meteor: ", ____)