<commit_before>class BeerSong
  def verse(number)
    (number == 0 ? BeerSongFinale.new : BeerSongVerse.new(number)).to_s
  end

  def verses(from, to)
    from.downto(to).map { |n| verse(n) + "\n" }.join
  end

  def sing
    verses(99, 0)
  end
end

class BeerSongVerse
  def initialize(number)
    @number = number
  end

  def to_s
    first_line + second_line
  end

  private

  attr_reader :number

  def first_line
    "#{bottles} of beer on the wall, #{bottles} of beer.\n"
  end

  def second_line
    "Take #{a_bottle} down and pass it around, " \
      "#{bottles_left} of beer on the wall.\n"
  end

  def bottles
    "#{number} #{bottle_word(number)}"
  end

  def a_bottle
    number == 1 ? 'it' : 'one'
  end

  def bottles_left
    "#{number == 1 ? 'no more' : number - 1} #{bottle_word(number - 1)}"
  end

  def bottle_word(n)
    "bottle#{n == 1 ? '' : 's'}"
  end
end

class BeerSongFinale
  def to_s
    'No more bottles of beer on the wall, ' \
    "no more bottles of beer.\n" \
    'Go to the store and buy some more, ' \
    "99 bottles of beer on the wall.\n"
  end
end<commit_msg>:construction_worker: Ruby Beer Song - more english<commit_after>class BeerSong
  def verse(number)
    (number == 0 ? BeerSongFinale.new : BeerSongVerse.new(number)).to_s
  end

  def verses(from, to)
    from.downto(to).map { |n| verse(n) + "\n" }.join
  end

  def sing
    verses(99, 0)
  end
end

class BeerSongVerse
  def initialize(number)
    @number = number
  end

  def to_s
    first_line + second_line
  end

  private

  attr_reader :number

  def first_line
    "#{some_bottles} of beer on the wall, #{some_bottles} of beer.\n"
  end

  def second_line
    "Take #{a_bottle} down and pass it around, " \
      "#{less_bottles} of beer on the wall.\n"
  end

  def some_bottles
    "#{number} #{bottle_word(number)}"
  end

  def a_bottle
    number == 1 ? 'it' : 'one'
  end

  def less_bottles
    "#{number == 1 ? 'no more' : number - 1} #{bottle_word(number - 1)}"
  end

  def bottle_word(n)
    "bottle#{n == 1 ? '' : 's'}"
  end
end

class BeerSongFinale
  def to_s
    'No more bottles of beer on the wall, ' \
    "no more bottles of beer.\n" \
    'Go to the store and buy some more, ' \
    "99 bottles of beer on the wall.\n"
  end
end
{'fraction_non_alphanumeric': 0.12119876597620097, 'fraction_numerical': 0.009695901278096077, 'mean_word_length': 2.6378205128205128, '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': '7291301', 'n_tokens_mistral': 926, 'n_tokens_neox': 867, 'n_words': 266}