<commit_before>module Tributary class App < Sinatra::Base

  register Sinatra::R18n

  use Rack::Session::Cookie, expire_after: 60 * 60 * 24 * 365 * 7

  def self.configure *args, &block
    set :cache?,     production?
    set :lang_limit, nil
    set :locale,     nil
    set :plugins,    []
    set :user_prefs, [:lang_limit, :locale]
    super
    set :stream,     cache? ? Tributary::Stream.new : nil
  end

  before do
    Tributary::App.locale     = session[:locale]
    Tributary::App.lang_limit = session[:lang_limit] && session[:lang_limit].split
    @stream = Tributary::App.stream || Tributary::Stream.new
  end<commit_msg>App: Sinatra’s ‘predicate’ options no longer work<commit_after>module Tributary class App < Sinatra::Base

  register Sinatra::R18n

  use Rack::Session::Cookie, expire_after: 60 * 60 * 24 * 365 * 7

  def self.configure *args, &block
    set :cache,      production?
    set :lang_limit, nil
    set :locale,     nil
    set :plugins,    []
    set :user_prefs, [:lang_limit, :locale]
    super
    set :stream,     cache ? Tributary::Stream.new : nil
  end

  before do
    Tributary::App.locale     = session[:locale]
    Tributary::App.lang_limit = session[:lang_limit] && session[:lang_limit].split
    @stream = Tributary::App.stream || Tributary::Stream.new
  end
{'fraction_non_alphanumeric': 0.12260536398467432, 'fraction_numerical': 0.01839080459770115, 'mean_word_length': 3.3533333333333335, 'pattern_counts': {'":': 0, '<': 5, '<?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': '2840778', 'n_tokens_mistral': 459, 'n_tokens_neox': 426, 'n_words': 109}