<commit_before>require 'test/unit'
require 'rubygems'
require 'active_record'
require 'sortifiable'
require 'support/migration'

if RUBY_VERSION < '1.9'
  $KCODE = 'UTF8'
end

driver = (ENV['DB'] or 'sqlite3').downcase
config = File.expand_path("../support/#{driver}.yml", __FILE__)
ActiveRecord::Base.establish_connection(YAML::load(File.open(config)))

ActiveRecord::Base.connection.tables.each do |table|
  ActiveRecord::Base.connection.drop_table(table)
end

ActiveRecord::Migration.verbose = false
CreateModels.up<commit_msg>Add LOG=true option<commit_after>require 'test/unit'
require 'rubygems'
require 'logger'
require 'active_record'
require 'sortifiable'
require 'support/migration'

if RUBY_VERSION < '1.9'
  $KCODE = 'UTF8'
end

ActiveRecord::Base.logger = Logger.new($stdout) if ENV["LOG"]

driver = (ENV['DB'] or 'sqlite3').downcase
config = File.expand_path("../support/#{driver}.yml", __FILE__)
ActiveRecord::Base.establish_connection(YAML::load(File.open(config)))

ActiveRecord::Base.connection.tables.each do |table|
  ActiveRecord::Base.connection.drop_table(table)
end

ActiveRecord::Migration.verbose = false
CreateModels.up
{'fraction_non_alphanumeric': 0.14921465968586387, 'fraction_numerical': 0.006980802792321117, 'mean_word_length': 7.251798561151079, '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': '3784984', 'n_tokens_mistral': 385, 'n_tokens_neox': 378, 'n_words': 71}