<commit_before>class CurrencyHumanizer

  def self.humanize(currency_string)
    raise "Invalid Format" unless self.valid_currency_string?(currency_string)
  end

  private

  MATCH_PATTERN = /^(\d+)\.(\d\d)$/

  def self.valid_currency_string?(currency_string)
    return MATCH_PATTERN.match(currency_string)
  end

  def self.build_cents_fraction(cents_string)
    return cents_string + "/100"
  end

  def self.build_cents_part(cents_string)
    return "and #{build_cents_fraction(cents_string)} dollars"
  end
<commit_msg>added comments to existing methods<commit_after>class CurrencyHumanizer

  # Converts a currency string to a human readable English representation of that string
  def self.humanize(currency_string)
    raise "Invalid Format" unless self.valid_currency_string?(currency_string)
  end

  private

  # definition of the regular expression for valid currency strings
  MATCH_PATTERN = /^(\d+)\.(\d\d)$/

  # returns true for valid currency strings, false otherwise
  def self.valid_currency_string?(currency_string)
    return MATCH_PATTERN.match(currency_string)
  end

  # returns the cents fraction
  def self.build_cents_fraction(cents_string)
    return cents_string + "/100"
  end

  # returns the cents part of a currency string
  def self.build_cents_part(cents_string)
    return "and #{build_cents_fraction(cents_string)} dollars"
  end

{'fraction_non_alphanumeric': 0.07883211678832117, 'fraction_numerical': 0.004379562043795621, 'mean_word_length': 4.7125, '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': '4118750', 'n_tokens_mistral': 443, 'n_tokens_neox': 405, 'n_words': 108}