<commit_before># Loader of ActiveRDF library
#
# Author:: <NAME> and <NAME>
# Copyright:: (c) 2005-2006 <NAME> and <NAME>
# License:: LGPL

# adding active_rdf subdirectory to the ruby loadpath
file = File.symlink?(__FILE__) ? File.readlink(__FILE__) : __FILE__
$: << File.dirname(File.expand_path(file)) + '/active_rdf/'

require 'active_rdf_helpers'
require 'active_rdf_log'

$log.info "ActiveRDF started, logging level: #{$log.level}"

# load standard classes that need to be loaded at startup
require 'objectmanager/resource'
require 'objectmanager/namespace'
require 'federation/connection_pool'
require 'queryengine/query'

#determine if we are installed as a gem right now:
if Gem::cache().search("activerdf").empty?
  #we are not running as a gem
  $log.info 'ActiveRDF is NOT installed as a Gem'
  require '../../activerdf-rdflite/lib/activerdf_rdflite/rdflite'
  require '../../activerdf-redland/lib/activerdf_redland/redland'
  require '../../activerdf-sparql/lib/activerdf_sparql/sparql'
  require '../../activerdf-yars/lib/activerdf_yars/yars'
else
  #we are indeed running as a gem
	require 'gem_plugin'
  $log.info 'ActiveRDF is installed as a Gem'
  GemPlugin::Manager.instance.load "activerdf" => GemPlugin::INCLUDE
end <commit_msg>fixed the relative loading of the adapters<commit_after># Loader of ActiveRDF library
#
# Author:: <NAME> and <NAME>
# Copyright:: (c) 2005-2006 <NAME> and <NAME>
# License:: LGPL

# adding active_rdf subdirectory to the ruby loadpath
file = File.symlink?(__FILE__) ? File.readlink(__FILE__) : __FILE__
this_dir = File.dirname(File.expand_path(file))
$: << this_dir
$: << this_dir + '/active_rdf/'

require 'active_rdf_helpers'
require 'active_rdf_log'

$log.info "ActiveRDF started, logging level: #{$log.level}"

# load standard classes that need to be loaded at startup
require 'objectmanager/resource'
require 'objectmanager/namespace'
require 'federation/connection_pool'
require 'queryengine/query'


def load_adapter s
  begin
    require s
  rescue StandardError
  end
end


#determine if we are installed as a gem right now:
if Gem::cache().search("activerdf").empty?
  #we are not running as a gem
  $log.info 'ActiveRDF is NOT installed as a Gem'
  load_adapter this_dir + '/../activerdf-rdflite/lib/activerdf_rdflite/rdflite'
  load_adapter this_dir + '/../activerdf-redland/lib/activerdf_redland/redland'
  load_adapter this_dir + '/../activerdf-sparql/lib/activerdf_sparql/sparql'
  load_adapter this_dir + '/../activerdf-yars/lib/activerdf_yars/jars2'
else
  #we are indeed running as a gem
	require 'gem_plugin'
  $log.info 'ActiveRDF is installed as a Gem'
  GemPlugin::Manager.instance.load "activerdf" => GemPlugin::INCLUDE
end 
  
{'fraction_non_alphanumeric': 0.12041496850685439, 'fraction_numerical': 0.006298629121896999, 'mean_word_length': 4.882352941176471, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 13, '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': '1827749', 'n_tokens_mistral': 929, 'n_tokens_neox': 911, 'n_words': 251}