<commit_before>$:.unshift File.join(__FILE__, "../config")

require 'sinatra/base'
require 'bundler/setup'
require 'routes'
require 'app_config'
require 'airbrake'

Dir.glob(File.join("models/**")) {|f| require "./#{f}"}

class DistrictApp < Sinatra::Base
  set :app_file, __FILE__
  set :views, settings.root + '/views'

  helpers do
    def word_splitter str
      return unless str
      str.split.map {|piece| piece.capitalize}.join(' ')
    end
  end
end<commit_msg>Capitalize roman numeral suffix in names<commit_after>$:.unshift File.join(__FILE__, "../config")

require 'sinatra/base'
require 'bundler/setup'
require 'routes'
require 'app_config'
require 'airbrake'

Dir.glob(File.join("models/**")) {|f| require "./#{f}"}

ROMAN_NOOMS = ["I", "II", "III", "IV", "V"]

class DistrictApp < Sinatra::Base
  set :app_file, __FILE__
  set :views, settings.root + '/views'

  helpers do
    def word_splitter str
      return unless str
      str.split.map do |piece|
        ROMAN_NOOMS.include?(piece) ? piece : piece.capitalize
      end.join(' ')
    end
  end
end
{'fraction_non_alphanumeric': 0.15592903828197946, 'fraction_numerical': 0.0, 'mean_word_length': 3.8506787330316743, 'pattern_counts': {'":': 0, '<': 5, '<?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': '6365991', 'n_tokens_mistral': 375, 'n_tokens_neox': 375, 'n_words': 96}