<commit_before>require 'rubygems'

dependencies = [
  { :title => 'LibXML', :lib => 'xml', :gem => 'libxml-ruby' }
]

# Load dependencies and display a helpful message if something is missing
dependencies.each { |lib|
  begin
    require lib[:lib]
  rescue LoadError
    puts "\nERROR: Missing dependency: #{lib[:title]}.\nPlease install with the following command:\nsudo gem install #{lib[:gem]}\n\n"
  end
}

# Load Lastfm-ruby classes
# require 'lastfm/base'
# ...<commit_msg>load Lastfm::Base, then all others.<commit_after>require 'rubygems'

dependencies = [
  { :title => 'LibXML', :lib => 'xml', :gem => 'libxml-ruby' }
]

# Load dependencies and display a helpful message if something is missing
dependencies.each { |lib|
  begin
    require lib[:lib]
  rescue LoadError
    puts "\nERROR: Missing dependency: #{lib[:title]}.\nPlease install with the following command:\nsudo gem install #{lib[:gem]}\n\n"
  end
}

# Load Lastfm-ruby classes
%w{base}.each { |lib| require File.dirname(__FILE__) + "/lastfm/#{lib}" }
{'fraction_non_alphanumeric': 0.1513671875, 'fraction_numerical': 0.0, 'mean_word_length': 4.310880829015544, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, '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': '4182068', 'n_tokens_mistral': 332, 'n_tokens_neox': 321, 'n_words': 99}