<commit_before>require 'schlepp/sink/chunker'

require 'schlepp/sinks/fs/table_object'
require 'schlepp/sinks/fs/table_object/writer'

module Schlepp
  module Sink
    module Fs
      class Chunker
        def initialize(table_object, opts = {})
          @table_object = table_object
        end

        def sequence
          chunker.sequence
        end

        def parts
          chunker.parts
        end

        def next
          part = chunker.next 

          ts = Schlepp::Sink::Fs::TableObject.new(part)

          Schlepp::Sink::Loader.new(ts)
        end

        private

        def chunker
          @chunker ||= Schlepp::Sink::Chunker.new(@table_object)
        end
      end
    end
  end
end
<commit_msg>Fixing FS chunker. It was basically broken.<commit_after>require 'schlepp/sink/chunker'

require 'schlepp/sinks/fs/table_object'
require 'schlepp/sinks/fs/table_object/writer'

module Schlepp
  module Sink
    module Fs
      class Chunker
        def initialize(table_object, opts = {})
          @table_object = table_object
          @parts = []
        end

        attr_accessor :parts

        def sequence
          chunker.sequence
        end

        def parts
          chunker.parts
        end

        def next
          part = chunker.next 

          table_obj = Schlepp::Sink::Fs::TableObject.new(part)

          @parts << table_obj

          writer = Schlepp::Sink::Fs::TableObject::Writer.new(table_obj)

          Schlepp::Sink::Loader.new(writer)
        end

        private

        def chunker
          @chunker ||= Schlepp::TableObject::Chunker.new(@table_object)
        end
      end
    end
  end
end

{'fraction_non_alphanumeric': 0.08438818565400844, 'fraction_numerical': 0.0, 'mean_word_length': 1.8620689655172413, 'pattern_counts': {'":': 0, '<': 5, '<?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': '3494285', 'n_tokens_mistral': 523, 'n_tokens_neox': 507, 'n_words': 105}