<commit_before>class Numbers

  def self.convert(number)

 if number == 1
   s = 'first'
  elsif number == 2
    s ='second'
  elsif number == 3
     s ='third'
 elsif number == 4
    s = 'fourth'
 elsif number == 5
    s = 'fifth'
  elsif number == 6
    s = 'sixth'
 elsif number == 7
   s = 'seventh'
  elsif number ==8
   s = 'eighth'
  elsif number == 9
   s = 'nineth'
  elsif number == 10
   s = 'tenth'
elsif number == 11
   s = 'eleventh'
  elsif number == 12
    s ='twelveth'
  elsif number == 13
     s ='thirteenth'
 elsif number == 14
    s = 'fourteenth'
 elsif number == 15
    s = 'fifteenth'
  elsif number == 16
    s = 'sixteenth'
 elsif number == 17
   s = 'seventeenth'
  elsif number == 18
   s = 'eighteenth'
  elsif number == 19
   s = 'nineteenth'
  elsif number == 20
   s = 'twentyth'
elsif number == 21
   s = 'twentyfirst'
  elsif number == 22
    s ='twentysecond'
  elsif number == 23
     s ='twentythird'
 elsif number == 24
    s = 'twentyfourth'
 elsif number == 25
    s = 'twentyfifth'
  elsif number == 26
    s = 'twentysixth'
 elsif number == 27
   s = 'twentyseventh'
  elsif number == 28
   s = 'twentyeigth'
  elsif number == 29
   s = 'twentynineth'
  elsif number == 30
   s = 'thirtyth'
 elsif number == 31
  s = 'thirtyfirst'
else number > 31
  s= ''
   
  end
  
  end

end <commit_msg>Reduced code with all test cases working<commit_after>class Numbers

  def self.convert(n)

if (1..31) === n
case n
when 1,21,31
s = "#{n}"+'st'
when 2,22
s = "#{n}"+'nd'
when 3,23
s = "#{n}"+'rd'
else
s = "#{n}"+'th'
end
else n > 31
  s= ''
end
end
end 
{'fraction_non_alphanumeric': 0.13971050975456262, 'fraction_numerical': 0.0446821900566394, 'mean_word_length': 2.502202643171806, 'pattern_counts': {'":': 0, '<': 3, '<?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': '317918', 'n_tokens_mistral': 708, 'n_tokens_neox': 646, 'n_words': 204}