import re
import string



class Metric:
    '''Base class for evaluating metric between predictions and targets'''
    def name(self):
        return "Not Defined"
    
    def normalize_answer(self,s):
        def remove_articles(text):
            return re.sub(r'\b(a|an|the)\b', ' ', text)

        def white_space_fix(text):
            return ' '.join(text.split())

        def remove_punc(text):
            exclude = set(string.punctuation)
            return ''.join(ch for ch in text if ch not in exclude)

        def lower(text):
            return text.lower()

        return white_space_fix(remove_articles(remove_punc(lower(s))))
    
    def evaluate(self,predictions,targets):
        pass