<commit_before>module FactHelper

  # IE 8 max url length is 2083 characters according to
  # http://stackoverflow.com/questions/417142/what-is-the-maximum-length-of-a-url
  def friendly_fact_path(fact, max_slug_length = 1024)
    slug = fact.to_s.blank? ? fact.id : fact.to_s.parameterize.slice(0,max_slug_length)
    frurl_fact_path(slug, fact.id)
  end
end<commit_msg>Added absolute url helper<commit_after>module FactHelper

  # IE 8 max url length is 2083 characters according to
  # http://stackoverflow.com/questions/417142/what-is-the-maximum-length-of-a-url
  def friendly_fact_path(fact, max_slug_length = 1024)
    slug = fact.to_s.blank? ? fact.id : fact.to_s.parameterize.slice(0,max_slug_length)
    frurl_fact_path(slug, fact.id)
  end

  def friendly_fact_url(fact, max_slug_length = 1024)
    slug = fact.to_s.blank? ? fact.id : fact.to_s.parameterize.slice(0,max_slug_length)
    frurl_fact_url(slug, fact.id)
  end
end
{'fraction_non_alphanumeric': 0.10779082177161152, 'fraction_numerical': 0.03948772678762007, 'mean_word_length': 4.421965317919075, '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': '5807875', 'n_tokens_mistral': 377, 'n_tokens_neox': 348, 'n_words': 63}