<commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
import sys


def _load_module(name):
    __import__(name)
    return sys.modules[name]


def _load_backend(name):
    module_name, klass_name = name.rsplit(".", 1)
    module = _load_module(module_name)
    return getattr(module, klass_name)<commit_msg>Cache backends<commit_after># -*- coding: utf-8 -*-
from __future__ import unicode_literals
import sys


_BACKENDS = {}

def _load_module(name):
    __import__(name)
    return sys.modules[name]


def _load_backend(name):
    try:
        return _BACKENDS[name]
    except KeyError:
        module_name, klass_name = name.rsplit(".", 1)
        module = _load_module(module_name)
        _BACKENDS[name] = getattr(module, klass_name)
        return _BACKENDS[name]
{'fraction_non_alphanumeric': 0.11055276381909548, 'fraction_numerical': 0.005025125628140704, 'mean_word_length': 3.6882352941176473, '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': '616955', 'n_tokens_mistral': 272, 'n_tokens_neox': 266, 'n_words': 58}