<commit_before>module DbSubsetter
  class Filter
    attr_writer :exporter

    def ignore_tables
      []
    end

    def tables
      @exporter.all_tables - ActiveRecord::SchemaDumper.ignore_tables - ignore_tables
    end

    def filter(table, query)
      filter_method = "filter_#{table}"
      if self.respond_to? filter_method
        self.send(filter_method, query)
      else
        query
      end
    end

  end
end
<commit_msg>downcase table names for filtering<commit_after>module DbSubsetter
  class Filter
    attr_writer :exporter

    def ignore_tables
      []
    end

    def tables
      @exporter.all_tables - ActiveRecord::SchemaDumper.ignore_tables - ignore_tables
    end

    def filter(table, query)
      filter_method = "filter_#{table.downcase}"
      if self.respond_to? filter_method
        self.send(filter_method, query)
      else
        query
      end
    end

  end
end

{'fraction_non_alphanumeric': 0.0625, 'fraction_numerical': 0.0, 'mean_word_length': 2.4583333333333335, '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': '2102754', 'n_tokens_mistral': 282, 'n_tokens_neox': 272, 'n_words': 66}