<commit_before>// Copyright (c) 2017 <NAME>
// Licensed under MIT License
//
// See LICENSE for license information

import Foundation

class Constants {

    /* Contents of test files:
     - test1: text file with "Hello, World!\n".
     - test2: text file with copyright free song lyrics from http://www.freesonglyrics.co.uk/lyrics13.html
     - test3: text file with random string from https://www.random.org/strings/
     - test4: text file with string "I'm a tester" repeated several times.
     - test6: file with size of 1MB containing nulls from /dev/zero.
     - test7: file with size of 1MB containing random bytes from /dev/urandom.
     - test8: text file from lzma_specification.
     - test9: file with size of 10KB containing random bytes from /dev/urandom.
    */

    static func data(forTest name: String, withType ext: String) -> Data? {
        if let url = Constants.url(forTest: name, withType: ext) {
            return try? Data(contentsOf: url, options: .mappedIfSafe)
        } else {
            return nil
        }
    }<commit_msg>Mention test5 in Constants again<commit_after>// Copyright (c) 2017 <NAME>
// Licensed under MIT License
//
// See LICENSE for license information

import Foundation

class Constants {

    /* Contents of test files:
     - test1: text file with "Hello, World!\n".
     - test2: text file with copyright free song lyrics from http://www.freesonglyrics.co.uk/lyrics13.html
     - test3: text file with random string from https://www.random.org/strings/
     - test4: text file with string "I'm a tester" repeated several times.
     - test5: empty file.
     - test6: file with size of 1MB containing nulls from /dev/zero.
     - test7: file with size of 1MB containing random bytes from /dev/urandom.
     - test8: text file from lzma_specification.
     - test9: file with size of 10KB containing random bytes from /dev/urandom.
    */

    static func data(forTest name: String, withType ext: String) -> Data? {
        if let url = Constants.url(forTest: name, withType: ext) {
            return try? Data(contentsOf: url, options: .mappedIfSafe)
        } else {
            return nil
        }
    }
{'fraction_non_alphanumeric': 0.09367789570835255, 'fraction_numerical': 0.01753576372865713, 'mean_word_length': 2.5775577557755778, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 2, 'lorem ipsum': 0, 'www.': 4, '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': '1265732', 'n_tokens_mistral': 655, 'n_tokens_neox': 623, 'n_words': 245}