<commit_before>require 'rubygems'
require 'bundler'
Bundler.require :default
require 'set'

Dir.glob(File.join(File.dirname(__FILE__), 'lederhosen', '*.rb')).each { |f| require f }

##
# Here I extend the string class to add the to_kmers method
#
# Does it really need to be a method of String? Sure, why not?
#
class String
  def to_kmers(k)
    return [] if k == 0
    k -= 1
    (0..(self.length-k-1)).collect { |i| self[i..i+k] }
  end
end<commit_msg>Bundler.require doesnt work when installed as a gem<commit_after>require 'rubygems'
require 'bundler'
require 'set'
require 'dna'
require 'progressbar'
require 'thor'

Dir.glob(File.join(File.dirname(__FILE__), 'lederhosen', '*.rb')).each { |f| require f }

##
# Here I extend the string class to add the to_kmers method
#
# Does it really need to be a method of String? Sure, why not?
#
class String
  def to_kmers(k)
    return [] if k == 0
    k -= 1
    (0..(self.length-k-1)).collect { |i| self[i..i+k] }
  end
end
{'fraction_non_alphanumeric': 0.14681724845995894, 'fraction_numerical': 0.008213552361396304, 'mean_word_length': 3.733009708737864, 'pattern_counts': {'":': 0, '<': 3, '<?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': '5677421', 'n_tokens_mistral': 363, 'n_tokens_neox': 358, 'n_words': 116}