<commit_before>//
//  AppDelegate.swift
//  Wikipsum
//
//  Created by <NAME> on 03/11/2014.
//  Copyright (c) 2014 <NAME>. All rights reserved.
//

import Cocoa

@NSApplicationMain
class AppDelegate: NSObject, NSApplicationDelegate {

    @IBOutlet weak var window: NSWindow!
    
    @IBOutlet weak var wikipsumButton: NSButtonCell!
    @IBOutlet weak var titleContent: NSTextField!
    @IBOutlet weak var characterCount: NSTextField!
    @IBOutlet var extractContent: NSTextView!
    
    func applicationDidFinishLaunching(aNotification: NSNotification) {
        // Insert code here to initialize your application
    }

    func applicationWillTerminate(aNotification: NSNotification) {
        // Insert code here to tear down your application
    }

    @IBAction func loadWikiContent(sender: NSButtonCell) {
        
        self.wikipsumButton.enabled = false;
        
        var apiPath = "http://fr.wikipedia.org/w/api.php?action=query&generator=random&grnnamespace=0&prop=extracts&exchars=500&format=json";<commit_msg>If no char length specify, take all length.<commit_after>//
//  AppDelegate.swift
//  Wikipsum
//
//  Created by <NAME> on 03/11/2014.
//  Copyright (c) 2014 <NAME>. All rights reserved.
//

import Cocoa

@NSApplicationMain
class AppDelegate: NSObject, NSApplicationDelegate {

    @IBOutlet weak var window: NSWindow!
    
    @IBOutlet weak var wikipsumButton: NSButtonCell!
    @IBOutlet weak var titleContent: NSTextField!
    @IBOutlet weak var characterCount: NSTextField!
    @IBOutlet var extractContent: NSTextView!
    
    func applicationDidFinishLaunching(aNotification: NSNotification) {
        // Insert code here to initialize your application
    }

    func applicationWillTerminate(aNotification: NSNotification) {
        // Insert code here to tear down your application
    }

    @IBAction func loadWikiContent(sender: NSButtonCell) {
        
        self.wikipsumButton.enabled = false;
        
        var apiPath = "http://fr.wikipedia.org/w/api.php?action=query&generator=random&grnnamespace=0&prop=extracts&format=json";
{'fraction_non_alphanumeric': 0.09117082533589252, 'fraction_numerical': 0.013915547024952015, 'mean_word_length': 3.389473684210526, 'pattern_counts': {'":': 0, '<': 7, '<?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': '6243175', 'n_tokens_mistral': 644, 'n_tokens_neox': 607, 'n_words': 158}