<commit_before># geofeed_validator/__init__.py
#
# ANEXIA GeoFeed Validator
#
# Copyright (C) 2014 ANEXIA Internetdienstleistungs GmbH
#
#
#  This program is free software: you can redistribute it and/or modify
#  it under the terms of the GNU Affero General Public License as
#  published by the Free Software Foundation, either version 3 of the
#  License, or (at your option) any later version.
#
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU Affero General Public License for more details.
#
#  You should have received a copy of the GNU Affero General Public License
#  along with this program.  If not, see <http://www.gnu.org/licenses/>.
#
# Authors:
#
# <NAME> <<EMAIL>>
#


import inspect
import io

from geofeed_validator.utils import is_file_like_object
from geofeed_validator.validator.base import BaseValidator, Registry

__version__ = '0.6.0'


class GeoFeedValidator(object):
    '''
    Validator class
    '''

    DEFAULT_VALIDATOR = 'draft02'

    def __init__(self, feed, validator=None, store_raw_records=False):
        '''
        Constructs the validator.

        :param feed: String or file-like object representing the feed.
        :type feed: str or file
        '''

        self._feed = None
        self._validator_name = validator if validator else self.DEFAULT_VALIDATOR

        #: :type: BaseValidator
        self._validator_instance = None
        self._result = None
        self._store_raw_records = store_raw_records

        if inspect.isclass(self._validator_name) and issubclass(self._validator_name, BaseValidator):<commit_msg>Bump version<commit_after># geofeed_validator/__init__.py
#
# ANEXIA GeoFeed Validator
#
# Copyright (C) 2014 ANEXIA Internetdienstleistungs GmbH
#
#
#  This program is free software: you can redistribute it and/or modify
#  it under the terms of the GNU Affero General Public License as
#  published by the Free Software Foundation, either version 3 of the
#  License, or (at your option) any later version.
#
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU Affero General Public License for more details.
#
#  You should have received a copy of the GNU Affero General Public License
#  along with this program.  If not, see <http://www.gnu.org/licenses/>.
#
# Authors:
#
# <NAME> <<EMAIL>>
#


import inspect
import io

from geofeed_validator.utils import is_file_like_object
from geofeed_validator.validator.base import BaseValidator, Registry

__version__ = '0.6.1'


class GeoFeedValidator(object):
    '''
    Validator class
    '''

    DEFAULT_VALIDATOR = 'draft02'

    def __init__(self, feed, validator=None, store_raw_records=False):
        '''
        Constructs the validator.

        :param feed: String or file-like object representing the feed.
        :type feed: str or file
        '''

        self._feed = None
        self._validator_name = validator if validator else self.DEFAULT_VALIDATOR

        #: :type: BaseValidator
        self._validator_instance = None
        self._result = None
        self._store_raw_records = store_raw_records

        if inspect.isclass(self._validator_name) and issubclass(self._validator_name, BaseValidator):
{'fraction_non_alphanumeric': 0.07338919387460272, 'fraction_numerical': 0.005778676683039584, 'mean_word_length': 3.4844559585492227, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '6586624', 'n_tokens_mistral': 1001, 'n_tokens_neox': 970, 'n_words': 360}