MCPcopy Create free account
hub / github.com/InternScience/InternAgent / calculate_meteor_score

Function calculate_meteor_score

tasks/AutoMem/code/utils.py:85–91  ·  view source on GitHub ↗

Calculate METEOR score for the prediction.

(prediction: str, reference: str)

Source from the content-addressed store, hash-verified

83 }
84
85def calculate_meteor_score(prediction: str, reference: str) -> float:
86 """Calculate METEOR score for the prediction."""
87 try:
88 return meteor_score([reference.split()], prediction.split())
89 except Exception as e:
90 print(f"Error calculating METEOR score: {e}")
91 return 0.0
92
93def calculate_sentence_similarity(prediction: str, reference: str) -> float:
94 """Calculate sentence embedding similarity using SentenceBERT."""

Callers 1

calculate_metricsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected