<commit_before>module Forester
  class TreeFactory

    class << self

      def from_yaml_file(file, options = {})
        default_options = {
          max_level: :last
        }
        options = default_options.merge(options)

        from_hash_with_root_key(YAML.load_file(file))
      end

      def from_root_hash(hash, options = {})
        default_options = {
          max_level:    :last,
          children_key: :children
        }
        options = default_options.merge(options)

        from_hash_with_root_key({ root: hash }, options)
      end<commit_msg>removed superfluous default options<commit_after>module Forester
  class TreeFactory

    class << self

      def from_yaml_file(file, options = {})
        from_hash_with_root_key(YAML.load_file(file), options)
      end

      def from_root_hash(hash, options = {})
        from_hash_with_root_key({ root: hash }, options)
      end
{'fraction_non_alphanumeric': 0.08599779492833518, 'fraction_numerical': 0.0, 'mean_word_length': 2.5193798449612403, 'pattern_counts': {'":': 0, '<': 7, '<?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': '4526034', 'n_tokens_mistral': 276, 'n_tokens_neox': 270, 'n_words': 53}