<commit_before>module Rfc2425
  module Utils
    def namerize(str, upcase = true)
      str = str.to_s.gsub(/_/, '-').gsub(/\s/, '')
      str.upcase! if upcase
      str
    end
    module_function :namerize
    
    def escape(str)
      str.to_s.gsub(/([,;:\\])/, '\\\\\1').gsub(/\r?\n/, '\n')
    end
    module_function :escape
  end
end<commit_msg>added rdoc<commit_after>module Rfc2425
  module Utils
    
    # Convert to valid and complete property name, normally
    # the results are upcased automatically.
    #
    #   Rfc2425::Utils.namerize(:name) # => "NAME"
    #   Rfc2425::Utils.namerize('x_aim') # => "X-AIM"
    #
    def namerize(str, upcase = true)
      str = str.to_s.gsub(/_/, '-').gsub(/\s/, '')
      str.upcase! if upcase
      str
    end
    module_function :namerize
    
    # Escape that string, as described in RFC.
    def escape(str)
      str.to_s.gsub(/([,;:\\])/, '\\\\\1').gsub(/\r?\n/, '\n')
    end
    module_function :escape
  end
end
{'fraction_non_alphanumeric': 0.17466802860061287, 'fraction_numerical': 0.018386108273748723, 'mean_word_length': 2.192182410423453, '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': '1264180', 'n_tokens_mistral': 387, 'n_tokens_neox': 375, 'n_words': 80}