<commit_before>class Say

  NUMBERS_UP_TO_ONE_HUNDRED = {
    100 => "hundred",
    90  => "ninety",
    80  => "eigthy",
    70  => "seventy",
    60  => "sixty",
    50  => "fifty",
    40  => "fourty",
    30  => "thirty",
    20  => "twenty"
  }

  NUMBERS_UP_TO_TWENTY = {
    20  => "twenty",
    19  => "nineteen",
    18  => "eigthteen",
    17  => "seventeen",
    16  => "sixteen",
    15  => "fifteen",
    14  => "fourteen",
    13  => "thirteen",
    12  => "twelve",
    11  => "eleven",
    10  => "ten",
    9   => "nine",
    8   => "eight",
    7   => "seven",
    6   => "six",
    5   => "five",
    4   => "four",
    3   => "three",
    2   => "two",
    1   => "one",
    0   => "zero",
  } 
  require 'pry'
  def initialize(question)
    @question = question
  end

  def in_english
    if @question <= 20
      NUMBERS_UP_TO_TWENTY[@question]
    elsif @question < 100
      numbers_less_then_100
    elsif @question < 1000
      hunders_column = @question / 100
      if @question % 100 != 0
        remainder = @question % 100
        # get recursive with remainder
      else
        NUMBERS_UP_TO_TWENTY[hunders_column] + " " + NUMBERS_UP_TO_ONE_HUNDRED[100]
      end
    end
  end
  
  private

  def numbers_less_then_100
    if digit_in_ones_column
      NUMBERS_UP_TO_ONE_HUNDRED[tens_column] + "-" + NUMBERS_UP_TO_TWENTY[ones_column]
    else
      NUMBERS_UP_TO_ONE_HUNDRED[@question]
    end
  end

  def digit_in_ones_column 
    @question / 10 !=0
  end

  def ones_column
    ones_column = @question / 10
  end

  def tens_column
    tens_column = @question - ones_column
  end
end
<commit_msg>Add defaults to extracted methods<commit_after>class Say

  require 'pry'

  NUMBERS_UP_TO_ONE_HUNDRED = {
    100 => "hundred",
    90  => "ninety",
    80  => "eigthy",
    70  => "seventy",
    60  => "sixty",
    50  => "fifty",
    40  => "fourty",
    30  => "thirty",
    20  => "twenty"
  }

  NUMBERS_UP_TO_TWENTY = {
    20  => "twenty",
    19  => "nineteen",
    18  => "eigthteen",
    17  => "seventeen",
    16  => "sixteen",
    15  => "fifteen",
    14  => "fourteen",
    13  => "thirteen",
    12  => "twelve",
    11  => "eleven",
    10  => "ten",
    9   => "nine",
    8   => "eight",
    7   => "seven",
    6   => "six",
    5   => "five",
    4   => "four",
    3   => "three",
    2   => "two",
    1   => "one",
    0   => "zero",
  } 

  def initialize(question)
    @question = question
  end

  def in_english
    if @question <= 20
      NUMBERS_UP_TO_TWENTY[@question]
    elsif @question < 100
      numbers_less_then_100
    elsif @question < 1000
      hunders_column = @question / 100
      if @question % 100 != 0
        remainder = @question % 100
        # get recursive with remainder
        numbers_less_then_100(remainder)
      else
        NUMBERS_UP_TO_TWENTY[hunders_column] + " " + NUMBERS_UP_TO_ONE_HUNDRED[100]
      end
    end
  end
  
  private

  def numbers_less_then_100(number = @question)
    if digit_in_ones_column(number)
      NUMBERS_UP_TO_ONE_HUNDRED[tens_column] + "-" + NUMBERS_UP_TO_TWENTY[ones_column]
    else
      NUMBERS_UP_TO_ONE_HUNDRED[@question]
    end
  end

  def digit_in_ones_column(number = @question) 
    number / 10 !=0
  end

  def ones_column(number = @question)
    ones_column = number / 10
  end

  def tens_column(number = @question)
    if number > 99
      number = number / 100
    end
    tens_column = number - ones_column
  end
end

{'fraction_non_alphanumeric': 0.12987012987012986, 'fraction_numerical': 0.050793650793650794, 'mean_word_length': 2.176901924839597, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 64, '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': '1149744', 'n_tokens_mistral': 1488, 'n_tokens_neox': 1338, 'n_words': 284}