<commit_before>require 'active_model/type/string'

module ActiveRecord
  module OracleEnhanced
    module Type
      class Text < ActiveModel::Type::Text # :nodoc:
        def changed_in_place?(raw_old_value, new_value)
          #TODO: Needs to find a way not to cast here.
          raw_old_value = cast(raw_old_value)
          super
        end

        def serialize(value)
          return unless value
          Data.new(super)
        end

        class Data # :nodoc:<commit_msg>Move `ActiveModel::Type::Text` to `ActiveRecord::Type::Text`<commit_after>require 'active_model/type/string'

module ActiveRecord
  module OracleEnhanced
    module Type
      class Text < ActiveRecord::Type::Text # :nodoc:
        def changed_in_place?(raw_old_value, new_value)
          #TODO: Needs to find a way not to cast here.
          raw_old_value = cast(raw_old_value)
          super
        end

        def serialize(value)
          return unless value
          Data.new(super)
        end

        class Data # :nodoc:
{'fraction_non_alphanumeric': 0.076171875, 'fraction_numerical': 0.0, 'mean_word_length': 2.349673202614379, 'pattern_counts': {'":': 0, '<': 5, '<?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': '6605319', 'n_tokens_mistral': 304, 'n_tokens_neox': 301, 'n_words': 80}