METEOR로 평가하기
METEOR는 텍스트의 의미론적 특징 일부를 평가하는 데 특히 강점이 있어요. 모델이 생성한 출력과 기준 출력(reference)을 비교한다는 점에서 ROUGE와 유사하게 동작합니다. 두 텍스트는 각각 generated와 reference로 제공되어 있으니, 이제 점수를 평가해 보세요.
evaluate 라이브러리는 미리 불러와 두었어요.
이 연습은 강의의 일부입니다
Python으로 배우는 LLM 입문
연습 안내
- METEOR 점수를 계산해 출력하세요.
실습형 인터랙티브 연습
이 예제를 이 샘플 코드를 완성하여 풀어보세요.
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: ", ____)