<commit_before>//
//  SwiftyVokoderTests.swift
//  SwiftSampleProject
//
//  Created by <NAME> on 11/5/15.
//  Copyright © 2015 Vokal.
//

import XCTest
import Vokoder
@testable import SwiftyVokoder

let grandMilwaukeeIdentifier = 30096

struct CTAData {

    static func allStopDictionaries() -> [[String: AnyObject]] {
        guard let
            path = NSBundle.mainBundle().pathForResource("CTA_stations", ofType: "json"),
            data = NSData(contentsOfFile: path)
            else {
                XCTFail("file not found")
                return []
        }
        
        do {
            let jsonObject = try NSJSONSerialization.JSONObjectWithData(data, options: [])
            guard let jsonArray = jsonObject as? [[String: AnyObject]] else {
                XCTFail("JSON in unexpected format")
                return []
            }
            return jsonArray
        } catch {
            XCTFail("Could not read JSON file")
            return []
        }
    }
}

class SwiftyVokoderTests: XCTestCase {
    
    override func setUp() {
        super.setUp()
        VOKCoreDataManager.sharedInstance().resetCoreData()
        VOKCoreDataManager.sharedInstance().setResource("CoreDataModel", database: nil)
    }<commit_msg>formatting guard let per standards<commit_after>//
//  SwiftyVokoderTests.swift
//  SwiftSampleProject
//
//  Created by <NAME> on 11/5/15.
//  Copyright © 2015 Vokal.
//

import XCTest
import Vokoder
@testable import SwiftyVokoder

let grandMilwaukeeIdentifier = 30096

struct CTAData {

    static func allStopDictionaries() -> [[String: AnyObject]] {
        guard let
            path = NSBundle.mainBundle().pathForResource("CTA_stations", ofType: "json"),
            data = NSData(contentsOfFile: path) else {
                XCTFail("file not found")
                return []
        }
        
        do {
            let jsonObject = try NSJSONSerialization.JSONObjectWithData(data, options: [])
            guard let jsonArray = jsonObject as? [[String: AnyObject]] else {
                XCTFail("JSON in unexpected format")
                return []
            }
            return jsonArray
        } catch {
            XCTFail("Could not read JSON file")
            return []
        }
    }
}

class SwiftyVokoderTests: XCTestCase {
    
    override func setUp() {
        super.setUp()
        VOKCoreDataManager.sharedInstance().resetCoreData()
        VOKCoreDataManager.sharedInstance().setResource("CoreDataModel", database: nil)
    }
{'fraction_non_alphanumeric': 0.09860834990059641, 'fraction_numerical': 0.011133200795228629, 'mean_word_length': 2.057108140947752, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '4891624', 'n_tokens_mistral': 740, 'n_tokens_neox': 700, 'n_words': 168}