<commit_before>require 'sinatra'

get '/' do
  redirect '/anagram-animation/a-giant-airman-moan', 307
end

get '/hashrocket' do
  @phrase, @anagram = 'hashrocket', 'hot hackers'
  erb :index
end

get '/benjamin-atkin' do
  @phrase, @anagram = '<NAME>', 'beatnik ninja'
  erb :index
end

get %r{/([\w-]+)/([\w-]+).*} do
  @phrase, @anagram = params['captures'].map {|s| s.tr('-', ' ')}
  erb :index
end
<commit_msg>refactored and added an anagram<commit_after>require 'sinatra'

get '/' do
  redirect '/anagram-animation/a-giant-airman-moan', 307
end

get %r{/([\w-]+)} do
  @phrase = params['captures'][0].tr('-', ' ')
  @anagram = {
    'hashrocket' => 'hot hackers',
    '<NAME>' => 'beatnik ninja',
    'clenching thin topsoil' => 'linchpin technologist'
  }[@phrase]
  erb :index
end

get %r{/([\w-]+)/([\w-]+).*} do
  @phrase, @anagram = params['captures'].map {|s| s.tr('-', ' ')}
  erb :index
end


{'fraction_non_alphanumeric': 0.23093922651933702, 'fraction_numerical': 0.0077348066298342545, 'mean_word_length': 3.670103092783505, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 8, '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': '6043093', 'n_tokens_mistral': 389, 'n_tokens_neox': 372, 'n_words': 85}