<commit_before>module ActiveInteraction
  InteractionInvalid = Class.new(StandardError)
  InvalidDefaultValue = Class.new(StandardError)
  InvalidNestedValue = Class.new(StandardError)
  InvalidValue = Class.new(StandardError)
  MissingValue = Class.new(StandardError)

  # TODO
  class Errors < ActiveModel::Errors
    # TODO
    # @return [Hash{Symbol => Array<Symbol>}]
    attr_reader :symbolic

    # TODO
    # @param attribute [Symbol]
    # @param symbol [Symbol]
    # @param message [String, Symbol, Proc]
    # @param options [Hash]
    # @return [Hash{Symbol => Array<String>}]<commit_msg>Document ActiveInteraction::Errors<commit_after>module ActiveInteraction
  InteractionInvalid = Class.new(StandardError)
  InvalidDefaultValue = Class.new(StandardError)
  InvalidNestedValue = Class.new(StandardError)
  InvalidValue = Class.new(StandardError)
  MissingValue = Class.new(StandardError)

  # A small extension to provide symbolic error messages to make introspecting
  #   and testing easier.
  class Errors < ActiveModel::Errors
    # A hash mapping attributes to arrays of symbolic messages.
    #
    # @return [Hash{Symbol => Array<Symbol>}]
    attr_reader :symbolic

    # Adds a symbolic error message to an attribute.
    #
    # @example
    #   errors.add_sym(:attribute)
    #   errors.symbolic
    #   # => {:attribute=>[:invalid]}
    # @param attribute [Symbol] The attribute to add an error to.
    # @param symbol [Symbol] The symbolic error to add.
    # @param message [String, Symbol, Proc]
    # @param options [Hash]
    # @return [Hash{Symbol => Array<String>}]
    # @see ActiveModel::Errors#add
{'fraction_non_alphanumeric': 0.10526315789473684, 'fraction_numerical': 0.0, 'mean_word_length': 3.9696048632218845, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 13, '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': '2954066', 'n_tokens_mistral': 478, 'n_tokens_neox': 467, 'n_words': 126}