<commit_before>module NestedDb
  class TaxonomyDrop < ::Liquid::Drop
    attr_accessor :taxonomy
    
    def initialize(taxonomy)
      self.taxonomy = taxonomy
      
      taxonomy.property_fields.each { |k,v|
        self.class.send(:define_method, "find_all_by_#{k.to_s}") do |value|
          taxonomy.instances.where({ k => value }).limit(100).map { |i|
            InstanceDrop.new(i, self)
          }
        end
        
        self.class.send(:define_method, "find_one_by_#{k.to_s}") do |value|
          instance = taxonomy.instances.where({ k => value }).find(:first)
          InstanceDrop.new(instance, self) if instance
        end
      }
    end
  
    def name
      taxonomy.name
    end
  
    def all
      taxonomy.instances.limit(100).map { |i|
        InstanceDrop.new(i, self)
      }
    end
    
    def count
      taxonomy.instances.count
    end
  
    def fields
      taxonomy.instances.build.fields.keys
    end
  end
end<commit_msg>Remove unneeded methods<commit_after>module NestedDb
  class TaxonomyDrop < ::Liquid::Drop
    attr_accessor :taxonomy
    
    def initialize(taxonomy)
      self.taxonomy = taxonomy
    end
  
    def name
      taxonomy.name
    end
  
    def all
      taxonomy.instances.limit(100).map { |i|
        InstanceDrop.new(i, self)
      }
    end
    
    def count
      taxonomy.instances.count
    end
  
    def fields
      taxonomy.instances.build.fields.keys
    end
  end
end
{'fraction_non_alphanumeric': 0.09504132231404959, 'fraction_numerical': 0.006198347107438017, 'mean_word_length': 1.9958762886597938, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '517233', 'n_tokens_mistral': 482, 'n_tokens_neox': 478, 'n_words': 95}