<commit_before># -*- coding: utf-8 -*-
from __future__ import division
from __future__ import print_function
from __future__ import absolute_import
from __future__ import unicode_literals

from six import add_metaclass
from abc import ABCMeta, abstractmethod


@add_metaclass(ABCMeta)
class API(object):
    """Processor representation.
    """

    @abstractmethod
    def __init__(self, **option):
        pass  # pragma: no cover

    # Public

    @abstractmethod
    def process(self, iterator):
        """Process iterator in normal mode.
        """
        pass  # pragma: no cover

    @abstractmethod
    def handle(self, iterator):
        """Process iterator with exception.
        """
        pass  # pragma: no cover<commit_msg>added processors docs<commit_after># -*- coding: utf-8 -*-
from __future__ import division
from __future__ import print_function
from __future__ import absolute_import
from __future__ import unicode_literals

from six import add_metaclass
from abc import ABCMeta, abstractmethod


@add_metaclass(ABCMeta)
class API(object):
    """Processor representation.

    Processor will be called on every iteration
    with `process` or `handle` methods. Processor
    can update `Iterator` instance to change
    rows emitted by `Table` instance.

    Parameters
    ----------
    options: dict
        Processing options.

    """

    @abstractmethod
    def __init__(self, **options):
        pass  # pragma: no cover

    # Public

    @abstractmethod
    def process(self, iterator):
        """Process iterator in normal mode.

        This method will be called if
        iterator.exception == None.

        Parameters
        ----------
        iterator: `Iterator`
            Table iterator.
        """
        pass  # pragma: no cover

    @abstractmethod
    def handle(self, iterator):
        """Process iterator with exception.

        This method will be called if
        iterator.exception != None.

        Parameters
        ----------
        iterator: `Iterator`
            Table iterator.
        """
        pass  # pragma: no cover
{'fraction_non_alphanumeric': 0.08869814020028613, 'fraction_numerical': 0.0009537434430138292, 'mean_word_length': 2.3893376413570273, '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': '5909482', 'n_tokens_mistral': 552, 'n_tokens_neox': 529, 'n_words': 190}