<commit_before>//
//  MusicMessage.swift
//  Peach
//
//  Created by <NAME> on 17/01/2016.
//  Copyright © 2016 Cocoon Development Ltd. All rights reserved.
//

import Foundation
import SwiftyJSON

public class MusicMessage: Message {

    public var title: String?
    
    // MARK: - Message Protocol
    
    public required init() { }
    
    public var type: MessageType = .Music
    
    public var dictionary: [String:AnyObject] {
        get {
            return [:]
        }
    }
    
    public static func messageFromJson(json: JSON) -> Message {
        let msg = MusicMessage()
        // TODO: Pull out iTunes and Spotify data returned by the Peach API
        msg.title = json["title"].string
        return msg
    }

}<commit_msg>Music message dict<commit_after>//
//  MusicMessage.swift
//  Peach
//
//  Created by <NAME> on 17/01/2016.
//  Copyright © 2016 Cocoon Development Ltd. All rights reserved.
//

import Foundation
import SwiftyJSON

public class MusicMessage: Message {

    public var title: String?
    
    // MARK: - Message Protocol
    
    public required init() { }
    
    public var type: MessageType = .Music
    
    public var dictionary: [String:AnyObject] {
        get {
            return [
                "type": "music",
                "title": (title != nil) ? title! : ""
            ]
        }
    }
    
    public static func messageFromJson(json: JSON) -> Message {
        let msg = MusicMessage()
        // TODO: Pull out iTunes and Spotify data returned by the Peach API
        msg.title = json["title"].string
        return msg
    }

}
{'fraction_non_alphanumeric': 0.10162094763092269, 'fraction_numerical': 0.014962593516209476, 'mean_word_length': 1.8971119133574008, 'pattern_counts': {'":': 2, '<': 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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2835451', 'n_tokens_mistral': 484, 'n_tokens_neox': 446, 'n_words': 150}