<commit_before>from abc import ABCMeta, abstractmethod


class Dataset(metaclass=ABCMeta):

    @property
    @abstractmethod
    def textual_reel_header(self):
        raise NotImplementedError

    @property
    @abstractmethod
    def binary_reel_header(self):
        raise NotImplementedError

    @property
    @abstractmethod
    def extended_textual_header(self):
        raise NotImplementedError

    @property
    def dimensionality(self):
        raise NotImplementedError

    @property
    @abstractmethod
    def trace_indexes(self):
        """An iterator over zero-based trace_samples indexes.

        Returns:
            An iterator which yields integers in the range zero to
            num_traces() - 1
        """
        raise NotImplementedError

    @abstractmethod
    def trace_header(self, trace_index):
        """The trace header for a given trace index."""
        raise NotImplementedError

    @abstractmethod
    def trace_samples(self, trace_index):
        """The trace samples for a given trace index."""
        raise NotImplementedError
<commit_msg>Improves the documentation a bit for the Dataset ABC.<commit_after>from abc import ABCMeta, abstractmethod


class Dataset(metaclass=ABCMeta):

    @property
    @abstractmethod
    def textual_reel_header(self):
        """The textual real header as an immutable sequence of forty Unicode strings each 80 characters long.
        """
        raise NotImplementedError

    @property
    @abstractmethod
    def binary_reel_header(self):
        """The binary reel header.
        """
        raise NotImplementedError

    @property
    @abstractmethod
    def extended_textual_header(self):
        raise NotImplementedError

    @property
    def dimensionality(self):
        """The spatial dimensionality of the data: 3 for 3D seismic volumes, 2 for 2D seismic lines, 1 for a
        single trace_samples, otherwise 0.
        """
        raise NotImplementedError

    @property
    @abstractmethod
    def trace_indexes(self):
        """An iterator over zero-based trace_samples indexes.

        Returns:
            An iterator which yields integers in the range zero to
            num_traces - 1
        """
        raise NotImplementedError

    @abstractmethod
    def trace_header(self, trace_index, header_packer_override=None):
        """The trace header for a given trace index.

        Args:
            trace_index: An integer in the range zero to num_traces() - 1

            header_packer_override: Override the default header packer (for example
               to more efficiently extract only a few fields)

        Returns:
            A TraceHeader corresponding to the requested trace_samples.
        """
        raise NotImplementedError

    @abstractmethod
    def trace_samples(self, trace_index, start=None, stop=None):
        """The trace samples for a given trace index.

        Args:
            trace_index: An integer in the range zero to num_traces - 1

            start: Optional zero-based start sample index. The default
                is to read from the first (i.e. zeroth) sample.

            stop: Optional zero-based stop sample index. Following Python
                slice convention this is one beyond the end.

        Returns:
            A sequence of numeric trace_samples samples.
        """
        raise NotImplementedError

{'fraction_non_alphanumeric': 0.057117490381769755, 'fraction_numerical': 0.003551346552234389, 'mean_word_length': 2.414141414141414, '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': '2832488', 'n_tokens_mistral': 882, 'n_tokens_neox': 830, 'n_words': 306}