<commit_before>module SequenceServer
  # Module to contain methods for dealing with taxonomic hierarchy.
  class Hierarchy
  
    def initialize (root = 'Lepidoptera')
    	@root = root
    end
    
  	def parents
      par = {
        'agraulis' => 'Butterflies',
  	    'bicyclus' => 'Butterflies',
  	    'bombyx' => 'Moths',
  	    'chilo' => 'Moths',
  	    'danaus' => 'Butterflies',
  	    'eueides' => 'Butterflies',
  	    'heliconius' => 'Butterflies',
  	    'laparus' => 'Butterflies',
  	    'lerema' => 'Butterflies',
  	    'manduca' => 'Moths',
  	    'melitaea' => 'Butterflies',
  	    'neruda' => 'Butterflies',
  	    'papilio' => 'Butterflies',
  	    'pieris' => 'Butterflies',
  	    'plodia' => 'Moths',
  	    'plutella' => 'Moths'
  	  }
  	  par.default = 'Lepidoptera'
  	  return par
    end
    
    def nesting(name)
      arr = [name]
      until name == 'Lepidoptera'
        name = parents[name]
        arr << name
      end
      return arr
    end
    
  end
end
<commit_msg>don't hard-code Lepidoptera as root<commit_after>module SequenceServer
  # Module to contain methods for dealing with taxonomic hierarchy.
  class Hierarchy
  
    def initialize (root = 'Lepidoptera')
    	@root = root
    end
    
  	def parents
      par = {
        'agraulis' => 'Butterflies',
  	    'bicyclus' => 'Butterflies',
  	    'bombyx' => 'Moths',
  	    'chilo' => 'Moths',
  	    'danaus' => 'Butterflies',
  	    'eueides' => 'Butterflies',
  	    'heliconius' => 'Butterflies',
  	    'laparus' => 'Butterflies',
  	    'lerema' => 'Butterflies',
  	    'manduca' => 'Moths',
  	    'melitaea' => 'Butterflies',
  	    'neruda' => 'Butterflies',
  	    'papilio' => 'Butterflies',
  	    'pieris' => 'Butterflies',
  	    'plodia' => 'Moths',
  	    'plutella' => 'Moths'
  	  }
  	  par.default = @root
  	  return par
    end
    
    def nesting(name)
      arr = [name]
      until name == @root
        name = parents[name]
        arr << name
      end
      return arr
    end
    
  end
end

{'fraction_non_alphanumeric': 0.14187192118226602, 'fraction_numerical': 0.0, 'mean_word_length': 2.0313432835820895, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 35, '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': '3844275', 'n_tokens_mistral': 817, 'n_tokens_neox': 759, 'n_words': 158}