def match(response, correct_answer: str, threshold=0.9) -> int:
        """Simple string match between response and correct_answer."""
        if not isinstance(response, str) or not isinstance(correct_answer, str):
            return 0
        response = approximate(response)
        correct_answer = approximate(correct_answer)
        return rapidfuzz.distance.DamerauLevenshtein.normalized_similarity(
            response, correct_answer, score_cutoff=threshold
        )
Simple string match between response and correct_answer.
vlmeval/dataset/utils/megabench/scoring/near_str_match.py