<commit_before>class ErrorNotification(object):
    def __init__(self, error_mapping):
        self.raw = error_mapping
        self.error = error_mapping['error']
        self.text = error_mapping['text']<commit_msg>Add from_mapping() to ErrorNofitication<commit_after>class ErrorNotification(object):
    def __init__(self, error, text):
        self.error = error
        self.text = text

    @classmethod
    def from_mapping(cls, error_mapping):
        return cls(error=error_mapping['error'],
                   text=error_mapping['text'])
{'fraction_non_alphanumeric': 0.10786106032906764, 'fraction_numerical': 0.0, 'mean_word_length': 3.4193548387096775, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '114103', 'n_tokens_mistral': 153, 'n_tokens_neox': 151, 'n_words': 30}