<commit_before># frozen_string_literal: true

if Rails.env.development?
  Dir["#{Folio::Engine.root}/app/models/folio/atom/**/*.rb", 'app/models/atom/**/*.rb'].each do |file|
    require_dependency file
  end
end

def get_subclasses(node)
  [node] + node.subclasses.map { |subclass| get_subclasses(subclass) }
end

module Folio
  module Atom
    def self.types
      Base.subclasses.map { |sub| get_subclasses(sub) }.flatten
    end
  end
end<commit_msg>fix folio/atom require_dependency to include namespaced atoms<commit_after># frozen_string_literal: true

if Rails.env.development?
  Dir[
    Folio::Engine.root.join('app/models/folio/atom/**/*.rb'),
    Rails.root.join('app/models/**/atom/**/*.rb')
  ].each do |file|
    require_dependency file
  end
end

def get_subclasses(node)
  [node] + node.subclasses.map { |subclass| get_subclasses(subclass) }
end

module Folio
  module Atom
    def self.types
      Base.subclasses.map { |sub| get_subclasses(sub) }.flatten
    end
  end
end
{'fraction_non_alphanumeric': 0.13824419778002017, 'fraction_numerical': 0.0, 'mean_word_length': 3.9353233830845773, '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': '2938472', 'n_tokens_mistral': 359, 'n_tokens_neox': 352, 'n_words': 73}