<commit_before>require 'sinatra/sparql'
require 'sinatra/partials'
require "better_errors"
require 'erubis'
require 'linkeddata'
require 'uri'

module RDF::Distiller
  class Application < Sinatra::Base
    register Sinatra::SPARQL
    helpers Sinatra::Partials
    set :views, ::File.expand_path('../views',  __FILE__)
    DOAP_NT = File.expand_path("../../../../etc/doap.nt", __FILE__)
    DOAP_JSON = File.expand_path("../../../../etc/doap.jsonld", __FILE__)

    configure :development do
      use BetterErrors::Middleware
      BetterErrors.application_root = File.expand_path("../../../..", __FILE__)
    end

    set :public_folder, File.expand_path("../../../../public", __FILE__)
    mime_type "sse", "application/sse+sparql-query"
    before do
      $logger.info "[#{request.path_info}], #{params.inspect}, #{format}, #{request.accept.inspect}"
    end<commit_msg>Don't include better_errors unless in development mode.<commit_after>require 'sinatra/sparql'
require 'sinatra/partials'
require 'erubis'
require 'linkeddata'
require 'uri'

module RDF::Distiller
  class Application < Sinatra::Base
    register Sinatra::SPARQL
    helpers Sinatra::Partials
    set :views, ::File.expand_path('../views',  __FILE__)
    DOAP_NT = File.expand_path("../../../../etc/doap.nt", __FILE__)
    DOAP_JSON = File.expand_path("../../../../etc/doap.jsonld", __FILE__)

    configure :development do
      require "better_errors"
      use BetterErrors::Middleware
      BetterErrors.application_root = File.expand_path("../../../..", __FILE__)
    end

    set :public_folder, File.expand_path("../../../../public", __FILE__)
    mime_type "sse", "application/sse+sparql-query"
    before do
      $logger.info "[#{request.path_info}], #{params.inspect}, #{format}, #{request.accept.inspect}"
    end
{'fraction_non_alphanumeric': 0.1746384872080089, 'fraction_numerical': 0.0, 'mean_word_length': 3.452970297029703, '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': '5427837', 'n_tokens_mistral': 574, 'n_tokens_neox': 566, 'n_words': 115}