<commit_before>module Moneta
  # Transforms keys and values (Marshal, YAML, JSON, Base64, MD5, ...).
  #
  # @example Add transformer to chain
  #   Moneta.build do
  #     transformer :key => [:marshal, :escape], :value => [:marshal]
  #     adapter :File, :dir => 'data'
  #   end
  #
  # You can bypass the transformer (e.g. serialization) by using the `:raw` option:
  #
  # @example Bypass serialization
  #   store.store('key', 'value', :raw => true)
  #   store['key'] => Error
  #   store.load('key', :raw => true) => 'value'
  #
  #   store['key'] = 'value'
  #   store.load('key', :raw => true) => "\x04\bI\"\nvalue\x06:\x06ET"
  #
  # @api public
  class Transformer < Proxy
    class << self
      alias_method :original_new, :new

      # Constructor
      #
      # @param [Moneta store] adapter The underlying store
      # @param [Hash] options
      #<commit_msg>comment cleanup<commit_after>module Moneta
  # Transforms keys and values (Marshal, YAML, JSON, Base64, MD5, ...).
  # You can bypass the transformer (e.g. serialization) by using the `:raw` option.
  #
  # @example Add transformer to chain
  #   Moneta.build do
  #     transformer :key => [:marshal, :escape], :value => [:marshal]
  #     adapter :File, :dir => 'data'
  #   end
  #
  # @example Bypass serialization
  #   store.store('key', 'value', :raw => true)
  #   store['key'] => Error
  #   store.load('key', :raw => true) => 'value'
  #
  #   store['key'] = 'value'
  #   store.load('key', :raw => true) => "\x04\bI\"\nvalue\x06:\x06ET"
  #
  # @api public
  class Transformer < Proxy
    class << self
      alias_method :original_new, :new

      # Constructor
      #
      # @param [Moneta store] adapter The underlying store
      # @param [Hash] options
      #
{'fraction_non_alphanumeric': 0.1621160409556314, 'fraction_numerical': 0.010238907849829351, 'mean_word_length': 2.7266949152542375, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 21, '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': '325574', 'n_tokens_mistral': 627, 'n_tokens_neox': 602, 'n_words': 163}