<commit_before>//
//  SwipeExtensions.swift
//  sample
//
//  Created by satoshi on 10/15/15.
//  Copyright © 2015 <NAME>. All rights reserved.
//

import UIKit

extension String {
    var localized:String {
        return NSLocalizedString(self, comment:"")
    }
}

extension URL {
    static func url(_ urlString:String, baseURL:URL?) -> URL? {
        let url = URL(string: urlString, relativeTo: baseURL!)
        if let scheme = url?.scheme, scheme.characters.count > 0 {
            return url
        }
    
        var components = urlString.components(separatedBy: "/")
        if components.count == 1 {
            return Bundle.main.url(forResource: urlString, withExtension: nil)
        }
        let filename = components.last
        components.removeLast()<commit_msg>Remove a wrongly added force unwrap during migration to Swift 3.<commit_after>//
//  SwipeExtensions.swift
//  sample
//
//  Created by satoshi on 10/15/15.
//  Copyright © 2015 <NAME>. All rights reserved.
//

import UIKit

extension String {
    var localized:String {
        return NSLocalizedString(self, comment:"")
    }
}

extension URL {
    static func url(_ urlString:String, baseURL:URL?) -> URL? {
        let url = URL(string: urlString, relativeTo: baseURL)
        if let scheme = url?.scheme, scheme.characters.count > 0 {
            return url
        }
    
        var components = urlString.components(separatedBy: "/")
        if components.count == 1 {
            return Bundle.main.url(forResource: urlString, withExtension: nil)
        }
        let filename = components.last
        components.removeLast()
{'fraction_non_alphanumeric': 0.10974106041923551, 'fraction_numerical': 0.015413070283600493, 'mean_word_length': 2.367219917012448, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, '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': '5078593', 'n_tokens_mistral': 483, 'n_tokens_neox': 451, 'n_words': 131}