<commit_before>module Manipulators
  class Randomizer
    def initialize(string)
      @string = string
    end

    def randomize
      word_array = split
      word_array.shuffle!
      word_array.join(" ")
    end

    def split
      splitter(@string).split
    end

    def splitter(string)
      @splitter ||= Manipulators::Splitter.new(string)
    end
  end
end<commit_msg>randomizer retains punctuation<commit_after>module Manipulators
  class Randomizer
    def initialize(string)
      @string = string
    end

    def randomize
      word_array = split
      word_array.shuffle!
      word_array.join(" ")
    end

    def split
      aerated = eng_tagger.get_sentences(@string)
      joined = aerated.join(" ")
      word_array = joined.split(" ")
    end

    def eng_tagger
      @eng_tagger ||= EngTagger.new
    end
  end
end
{'fraction_non_alphanumeric': 0.07957244655581948, 'fraction_numerical': 0.0, 'mean_word_length': 2.440816326530612, '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': '7645309', 'n_tokens_mistral': 270, 'n_tokens_neox': 260, 'n_words': 60}