<commit_before>require_relative 'data'

def format_player(player)
  str = player.to_s.downcase
  return "Player #{str.scan(/p(\d+)/)[0][0]}" if str[/p\d+/]

  player
end

def format_switch_mod(value)
  return "set" if [true, :set, "set", :true].include?(value)
  return "clear" if [false, :clear, "clear", :false].include?(value)
  return "toggle" if [:toggle, "toggle"].include?(value)

  value
end

def format_vmod(value)
  str = value.to_s.downcase<commit_msg>rejigger switch mod format<commit_after>require_relative 'data'

def format_player(player)
  str = player.to_s.downcase
  return "Player #{str.scan(/p(\d+)/)[0][0]}" if str[/p\d+/]

  player
end

def format_switch_mod(value)
  str = value.to_s.downcase
  return "set" if ["set", "true"].include?(str)
  return "clear" if ["false", "clear", :false].include?(str)
  return "toggle" if "toggle" == str

  value
end

def format_vmod(value)
  str = value.to_s.downcase
{'fraction_non_alphanumeric': 0.17386609071274298, 'fraction_numerical': 0.004319654427645789, 'mean_word_length': 4.79375, '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': '1821280', 'n_tokens_mistral': 353, 'n_tokens_neox': 349, 'n_words': 81}