<commit_before>module Utilities
  module FileSystemHelpers

    def file_exists?(filename)
      return false if filename.nil? || filename.length < 1
      File.file?(filepath_from(filename))
    end

    def filepath_from(filename)
      def filepath_from(filename)
        return filename if filename.nil? || filename.length < 1

        if filename[0] == '/' || filename[0] == '~' || filename[1] == ':'
          filename
        else
          File.join(Dir.pwd, filename)
        end
      end
    end

  end
end<commit_msg>Support relative AND absolute paths in config files, windows (I think) and mac/*nix<commit_after>module Utilities
  module FileSystemHelpers

    def file_exists?(filename)
      return false if filename.nil? || filename.length < 1
      File.file?(filepath_from(filename))
    end

    def filepath_from(filename)
      return filename if filename.nil? || filename.length < 1

      if filename[0] == '/' || filename[0] == '~' || filename[1] == ':'
        filename
      else
        File.join(Dir.pwd, filename)
      end
    end

  end
end
{'fraction_non_alphanumeric': 0.11100746268656717, 'fraction_numerical': 0.009328358208955223, 'mean_word_length': 2.588628762541806, 'pattern_counts': {'":': 0, '<': 7, '<?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': '3612592', 'n_tokens_mistral': 322, 'n_tokens_neox': 314, 'n_words': 82}