<commit_before># encoding: UTF-8

$LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__) + "/../lib"))

begin
  require "ruby-debug"
rescue LoadError
end

require "rubygems"
require "cutest"

def silence_warnings
  original_verbose, $VERBOSE = $VERBOSE, nil
  yield
ensure
  $VERBOSE = original_verbose
end unless defined?(silence_warnings)

$VERBOSE = true

require "ohm"

Ohm.redis = Redic.new("redis://127.0.0.1:6379")

prepare do
  Ohm.redis.call("FLUSHALL")
end<commit_msg>Remove rubygems require. Ohm supports Ruby >=1.9.<commit_after># encoding: UTF-8

$LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__) + "/../lib"))

begin
  require "ruby-debug"
rescue LoadError
end

require "cutest"

def silence_warnings
  original_verbose, $VERBOSE = $VERBOSE, nil
  yield
ensure
  $VERBOSE = original_verbose
end unless defined?(silence_warnings)

$VERBOSE = true

require "ohm"

Ohm.redis = Redic.new("redis://127.0.0.1:6379")

prepare do
  Ohm.redis.call("FLUSHALL")
end
{'fraction_non_alphanumeric': 0.13353720693170235, 'fraction_numerical': 0.024464831804281346, 'mean_word_length': 4.987804878048781, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '5850680', 'n_tokens_mistral': 389, 'n_tokens_neox': 378, 'n_words': 79}