<commit_before># encoding: utf-8
module VoshodAvtoImport

  module StringExt

    def utf8

      self.force_encoding(::Encoding::UTF_8) if self.respond_to?(:force_encoding)
      self

    end # utf8

    def escape

      self.
        gsub(/'/, "\\\\'").
        gsub(/"/, '\\\\"').
        gsub(/\n/, "\\n").
        gsub(/\r/, "\\r")

    end # escape

  end # StringExt

  module NilExt

    def utf8
      self
    end # utf8

  end # NilExt

end # VoshodAvtoImport

class String
  include ::VoshodAvtoImport::StringExt
end # String

class NilClass
  include ::VoshodAvtoImport::NilExt
end<commit_msg>Мелкие правки.<commit_after># encoding: utf-8
module VoshodAvtoImport

  module StringExt

    def utf8

      self.force_encoding(::Encoding::UTF_8) if self.respond_to?(:force_encoding)
      self

    end # utf8

    def escape

      str = self.gsub(/'/, "\\\\'")
      str.gsub!(/"/, '\\\\"')
      str.gsub!(/\n/, "\\n")
      str.gsub!(/\r/, "\\r")
      str

    end # escape

  end # StringExt

  module NilExt

    def utf8
      self
    end # utf8

  end # NilExt

end # VoshodAvtoImport

class String
  include ::VoshodAvtoImport::StringExt
end # String


class NilClass
  include ::VoshodAvtoImport::NilExt
end
{'fraction_non_alphanumeric': 0.1389114541023558, 'fraction_numerical': 0.00974817221770918, 'mean_word_length': 2.2083333333333335, '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': '4768619', 'n_tokens_mistral': 468, 'n_tokens_neox': 428, 'n_words': 101}