<commit_before>require "fileutils"

class Sheldon
  VERSION = "0.2.4".freeze
  attr_reader :brain, :builder

  def initialize(sheldon_data_dir, opts = {})
    raise "Directory #{sheldon_data_dir} does not exist" unless Dir.exists?(sheldon_data_dir)
    @brain = opts[:brain] || Brain.new(sheldon_data_dir)
    @builder = opts[:builder] || Builder.new
  end

  def build(abs_learn_path)
    builder.build(abs_learn_path)
  end

  def learn(recall_cue, abs_learn_path)<commit_msg>Bumping patch level now that Sheldon comes as a Gem<commit_after>require "fileutils"

class Sheldon
  VERSION = "0.2.5".freeze
  attr_reader :brain, :builder

  def initialize(sheldon_data_dir, opts = {})
    raise "Directory #{sheldon_data_dir} does not exist" unless Dir.exists?(sheldon_data_dir)
    @brain = opts[:brain] || Brain.new(sheldon_data_dir)
    @builder = opts[:builder] || Builder.new
  end

  def build(abs_learn_path)
    builder.build(abs_learn_path)
  end

  def learn(recall_cue, abs_learn_path)
{'fraction_non_alphanumeric': 0.11066398390342053, 'fraction_numerical': 0.006036217303822937, 'mean_word_length': 4.784883720930233, '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': '79235', 'n_tokens_mistral': 370, 'n_tokens_neox': 353, 'n_words': 76}