<commit_before>import os
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from haystack.indexes import ModelIndex
from haystack.sites import SearchIndex, site


__author__ = '<NAME>'
__version__ = (2, 0, 0, 'alpha')
__all__ = ['backend']


# Load the search backend.
if not hasattr(settings, "SEARCH_ENGINE"):
    raise ImproperlyConfigured("You must define the SEARCH_ENGINE setting before using the search framework.")

try:
    # Most of the time, the search backend will be one of the  
    # backends that ships with haystack, so look there first.
    backend = __import__('haystack.backends.%s' % settings.SEARCH_ENGINE, {}, {}, [''])
except ImportError, e:
    # If the import failed, we might be looking for a search backend 
    # distributed external to haystack. So we'll try that next.
    try:
        backend = __import__(settings.SEARCH_ENGINE, {}, {}, [''])
    except ImportError, e_user:
        # The database backend wasn't found. Display a helpful error message
        # listing all possible (built-in) database backends.
        backend_dir = os.path.join(__path__[0], 'backends')<commit_msg>Now that Solr and core feature set are solid, moved haystack into beta status.<commit_after>import os
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from haystack.indexes import ModelIndex
from haystack.sites import SearchIndex, site


__author__ = '<NAME>'
__version__ = (2, 0, 0, 'beta')
__all__ = ['backend']


# Load the search backend.
if not hasattr(settings, "SEARCH_ENGINE"):
    raise ImproperlyConfigured("You must define the SEARCH_ENGINE setting before using the search framework.")

try:
    # Most of the time, the search backend will be one of the  
    # backends that ships with haystack, so look there first.
    backend = __import__('haystack.backends.%s' % settings.SEARCH_ENGINE, {}, {}, [''])
except ImportError, e:
    # If the import failed, we might be looking for a search backend 
    # distributed external to haystack. So we'll try that next.
    try:
        backend = __import__(settings.SEARCH_ENGINE, {}, {}, [''])
    except ImportError, e_user:
        # The database backend wasn't found. Display a helpful error message
        # listing all possible (built-in) database backends.
        backend_dir = os.path.join(__path__[0], 'backends')
{'fraction_non_alphanumeric': 0.09435551811288964, 'fraction_numerical': 0.003369839932603201, 'mean_word_length': 3.9582463465553235, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '6470418', 'n_tokens_mistral': 687, 'n_tokens_neox': 664, 'n_words': 256}