<commit_before>module FlowTemplate
  def self.templates
    {
      "up for grabs" =>
        { title: "Up for grabs" },
      "my tasks" =>
        { title: "My tasks" },
      "my papers" =>
        { title: "My papers" },
      "done" =>
        { title: "Done" }
    }
  end

  def self.template(title)
    templates.fetch(title.downcase, invalid_template)
  end

  def self.valid_titles
    templates.values.map { |template| template[:title] }
  end

  private

  def invalid_template
    { title: "Invalid" }
  end
end<commit_msg>[#83023864] fix invalid template helper<commit_after>module FlowTemplate
  def self.templates
    {
      "up for grabs" =>
        { title: "Up for grabs" },
      "my tasks" =>
        { title: "My tasks" },
      "my papers" =>
        { title: "My papers" },
      "done" =>
        { title: "Done" }
    }
  end

  def self.template(title)
    templates.fetch(title.downcase, invalid_template)
  end

  def self.valid_titles
    templates.values.map { |template| template[:title] }
  end

  private

  def self.invalid_template
    { title: "Invalid" }
  end
end
{'fraction_non_alphanumeric': 0.12692656391659113, 'fraction_numerical': 0.007252946509519492, 'mean_word_length': 2.2857142857142856, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '6513071', 'n_tokens_mistral': 373, 'n_tokens_neox': 354, 'n_words': 89}