<commit_before>//
//  SwiftLinkPreview.swift
//  SwiftLinkPreview
//
//  Created by <NAME> on 09/06/2016.
//  Copyright © 2016 <EMAIL>. All rights reserved.
//
import Foundation

public enum SwiftLinkResponseKey : String {
    case url
    case finalUrl
    case canonicalUrl
    case title
    case description
    case image
    case images
}

open class Cancellable {
    public private(set) var isCancelled : Bool = false
    
    open func cancel() {
        isCancelled = true
    }
}

open class SwiftLinkPreview {
    
    public typealias Response = [SwiftLinkResponseKey: Any]
    public typealias Cancel = () -> Void
    
    // MARK: - Vars
    static let titleMinimumRelevant: Int = 15
    static let decriptionMinimumRelevant: Int = 100
    
    fileprivate let session: URLSession
    fileprivate let workQueue: DispatchQueue
    fileprivate let responseQueue: DispatchQueue
    fileprivate let cache: Cache<commit_msg>Removed not needed type alias<commit_after>//
//  SwiftLinkPreview.swift
//  SwiftLinkPreview
//
//  Created by <NAME> on 09/06/2016.
//  Copyright © 2016 leoc<EMAIL>.<EMAIL>. All rights reserved.
//
import Foundation

public enum SwiftLinkResponseKey : String {
    case url
    case finalUrl
    case canonicalUrl
    case title
    case description
    case image
    case images
}

open class Cancellable {
    public private(set) var isCancelled : Bool = false
    
    open func cancel() {
        isCancelled = true
    }
}

open class SwiftLinkPreview {
    
    public typealias Response = [SwiftLinkResponseKey: Any]
    
    // MARK: - Vars
    static let titleMinimumRelevant: Int = 15
    static let decriptionMinimumRelevant: Int = 100
    
    fileprivate let session: URLSession
    fileprivate let workQueue: DispatchQueue
    fileprivate let responseQueue: DispatchQueue
    fileprivate let cache: Cache
{'fraction_non_alphanumeric': 0.06792452830188679, 'fraction_numerical': 0.018328840970350403, 'mean_word_length': 2.7877551020408164, 'pattern_counts': {'":': 0, '<': 8, '<?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': '901261', 'n_tokens_mistral': 578, 'n_tokens_neox': 522, 'n_words': 177}