<commit_before>base_url = "https://#{request.host_with_port}"
xml.instruct! :xml, :version=>'1.0'
 
xml.tag! 'urlset', "xmlns" => "http://www.sitemaps.org/schemas/sitemap/0.9" do
 
  xml.url do
    xml.loc "#{base_url}"
    xml.changefreq "monthly"
    xml.priority 1.0
  end
 
  xml.url do
    xml.loc "#{base_url}/faq"
    xml.lastmod Time.now.to_date
    xml.changefreq "monthly"
    xml.priority 1.0
  end

  xml.url do
    xml.loc "#{base_url}/recent"
    xml.lastmod Time.now.to_date
    xml.changefreq "daily"
    xml.priority 1.0
  end

  xml.url do
    xml.loc "#{base_url}/legislators"
    xml.lastmod Time.now.to_date
    xml.changefreq "monthly"
    xml.priority 1.0
  end

  xml.url do
    xml.loc "#{base_url}/legislators/no_record"
    xml.lastmod Time.now.to_date
    xml.changefreq "daily"
    xml.priority 1.0
  end

  xml.url do
    xml.loc "#{base_url}/legislators/has_records"
    xml.lastmod Time.now.to_date
    xml.changefreq "daily"
    xml.priority 1.0
  end

  xml.url do
    xml.loc "#{base_url}/videos"
    xml.lastmod Time.now.to_date
    xml.changefreq "daily"
    xml.priority 1.0
  end

  xml.url do
    xml.loc "#{base_url}/entries"
    xml.lastmod Time.now.to_date
    xml.changefreq "daily"
    xml.priority 1.0
  end

  xml.url do
    xml.loc "#{base_url}/questions"
    xml.lastmod Time.now.to_date
    xml.changefreq "daily"
    xml.priority 1.0
  end
 
  xml.url do
    xml.loc "#{base_url}/privacy"
    xml.lastmod Time.now.to_date
    xml.changefreq "monthly"
    xml.priority 1.0
  end

  xml.url do
    xml.loc "#{base_url}/service"
    xml.lastmod Time.now.to_date
    xml.changefreq "monthly"
    xml.priority 1.0
  end

  xml.url do
    xml.loc "#{base_url}/tutorial"
    xml.lastmod Time.now.to_date
    xml.changefreq "monthly"
    xml.priority 1.0
  end
 
  xml.url do
    xml.loc "#{base_url}/about"
    xml.lastmod Time.now.to_date
    xml.changefreq "monthly"
    xml.priority 1.0
  end
 
  @legislators.each do |legislator|
    xml.url do
      xml.loc legislator_url(legislator)
      xml.lastmod question.updated_at.to_date
      xml.changefreq "monthly"
      xml.priority 0.9
    end

    xml.url do
      xml.loc entries_legislator_url(legislator)
      xml.lastmod question.updated_at.to_date
      xml.changefreq "daily"
      xml.priority 0.9
    end

    xml.url do
      xml.loc questions_legislator_url(legislator)
      xml.lastmod question.updated_at.to_date
      xml.changefreq "daily"
      xml.priority 0.9
    end

    xml.url do
      xml.loc videos_legislator_url(legislator)
      xml.lastmod question.updated_at.to_date
      xml.changefreq "daily"
      xml.priority 0.9
    end
  end
 
  @entries.each do |entry|
    xml.url do
      xml.loc entry_url(entry)
      xml.lastmod entry.updated_at.to_date
      xml.changefreq "monthly"
      xml.priority 0.9
    end
  end

  @questions.each do |question|
    xml.url do
      xml.loc question_url(question)
      xml.lastmod question.updated_at.to_date
      xml.changefreq "monthly"
      xml.priority 0.9
    end
  end

  @videos.each do |video|
    xml.url do
      xml.loc video_url(video)
      xml.lastmod video.updated_at.to_date
      xml.changefreq "monthly"
      xml.priority 0.9
    end
  end
 
end<commit_msg>fix sitemap error<commit_after>base_url = "https://#{request.host_with_port}"
xml.instruct! :xml, :version=>'1.0'
 
xml.tag! 'urlset', "xmlns" => "http://www.sitemaps.org/schemas/sitemap/0.9" do
 
  xml.url do
    xml.loc "#{base_url}"
    xml.changefreq "monthly"
    xml.priority 1.0
  end
 
  xml.url do
    xml.loc "#{base_url}/faq"
    xml.lastmod Time.now.to_date
    xml.changefreq "monthly"
    xml.priority 1.0
  end

  xml.url do
    xml.loc "#{base_url}/recent"
    xml.lastmod Time.now.to_date
    xml.changefreq "daily"
    xml.priority 1.0
  end

  xml.url do
    xml.loc "#{base_url}/legislators"
    xml.lastmod Time.now.to_date
    xml.changefreq "monthly"
    xml.priority 1.0
  end

  xml.url do
    xml.loc "#{base_url}/legislators/no_record"
    xml.lastmod Time.now.to_date
    xml.changefreq "daily"
    xml.priority 1.0
  end

  xml.url do
    xml.loc "#{base_url}/legislators/has_records"
    xml.lastmod Time.now.to_date
    xml.changefreq "daily"
    xml.priority 1.0
  end

  xml.url do
    xml.loc "#{base_url}/videos"
    xml.lastmod Time.now.to_date
    xml.changefreq "daily"
    xml.priority 1.0
  end

  xml.url do
    xml.loc "#{base_url}/entries"
    xml.lastmod Time.now.to_date
    xml.changefreq "daily"
    xml.priority 1.0
  end

  xml.url do
    xml.loc "#{base_url}/questions"
    xml.lastmod Time.now.to_date
    xml.changefreq "daily"
    xml.priority 1.0
  end
 
  xml.url do
    xml.loc "#{base_url}/privacy"
    xml.lastmod Time.now.to_date
    xml.changefreq "monthly"
    xml.priority 1.0
  end

  xml.url do
    xml.loc "#{base_url}/service"
    xml.lastmod Time.now.to_date
    xml.changefreq "monthly"
    xml.priority 1.0
  end

  xml.url do
    xml.loc "#{base_url}/tutorial"
    xml.lastmod Time.now.to_date
    xml.changefreq "monthly"
    xml.priority 1.0
  end
 
  xml.url do
    xml.loc "#{base_url}/about"
    xml.lastmod Time.now.to_date
    xml.changefreq "monthly"
    xml.priority 1.0
  end
 
  @legislators.each do |legislator|
    xml.url do
      xml.loc legislator_url(legislator)
      xml.lastmod legislator.updated_at.to_date
      xml.changefreq "monthly"
      xml.priority 0.9
    end

    xml.url do
      xml.loc entries_legislator_url(legislator)
      xml.lastmod legislator.updated_at.to_date
      xml.changefreq "daily"
      xml.priority 0.9
    end

    xml.url do
      xml.loc questions_legislator_url(legislator)
      xml.lastmod legislator.updated_at.to_date
      xml.changefreq "daily"
      xml.priority 0.9
    end

    xml.url do
      xml.loc videos_legislator_url(legislator)
      xml.lastmod legislator.updated_at.to_date
      xml.changefreq "daily"
      xml.priority 0.9
    end
  end
 
  @entries.each do |entry|
    xml.url do
      xml.loc entry_url(entry)
      xml.lastmod entry.updated_at.to_date
      xml.changefreq "monthly"
      xml.priority 0.9
    end
  end

  @questions.each do |question|
    xml.url do
      xml.loc question_url(question)
      xml.lastmod question.updated_at.to_date
      xml.changefreq "monthly"
      xml.priority 0.9
    end
  end

  @videos.each do |video|
    xml.url do
      xml.loc video_url(video)
      xml.lastmod video.updated_at.to_date
      xml.changefreq "monthly"
      xml.priority 0.9
    end
  end
 
end
{'fraction_non_alphanumeric': 0.10725261216963737, 'fraction_numerical': 0.013521819299323909, 'mean_word_length': 2.3812987012987015, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 206}, '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': '3094701', 'n_tokens_mistral': 2563, 'n_tokens_neox': 2436, 'n_words': 491}