<commit_before>//
//  Mappings.swift
//  Ashton
//
//  Created by <NAME> on 19.12.17.
//  Copyright © 2017 <NAME>. All rights reserved.
//

#if os(iOS)
    import UIKit
#elseif os(macOS)
    import AppKit
#endif
import Foundation


// Defines mappings between HTML attributes and AttributedString keys
struct Mappings {

    struct UnderlineStyle {
        static let encode: [NSUnderlineStyle.RawValue: String] = [
            NSUnderlineStyle.styleSingle.rawValue: "single",
            NSUnderlineStyle.styleDouble.rawValue: "double",
            NSUnderlineStyle.styleThick.rawValue: "thick"
        ]
        static let decode: [String: NSUnderlineStyle] = [
            "single": .styleSingle,
            "double": .styleDouble,
            "thick": .styleThick
        ]
    }

    struct TextAlignment {
        static let encode: [NSTextAlignment: String] = [
            .left: "left",
            .center: "center",
            .right: "right",
            .justified: "justify",
            .natural: "left"
        ]
        static let decode: [String: NSTextAlignment] = [
            "left": .left,
            "center": .center,
            "right": .right,
            "justify": .justified
        ]
    }

    struct TextDecoration {
        static let decode: [String: NSAttributedStringKey] = [
            "underline": .underlineStyle,
            "line-through": .strikethroughStyle
        ]<commit_msg>Remove textAlignment mapping from natural to left<commit_after>//
//  Mappings.swift
//  Ashton
//
//  Created by <NAME> on 19.12.17.
//  Copyright © 2017 <NAME>. All rights reserved.
//

#if os(iOS)
    import UIKit
#elseif os(macOS)
    import AppKit
#endif
import Foundation


// Defines mappings between HTML attributes and AttributedString keys
struct Mappings {

    struct UnderlineStyle {
        static let encode: [NSUnderlineStyle.RawValue: String] = [
            NSUnderlineStyle.styleSingle.rawValue: "single",
            NSUnderlineStyle.styleDouble.rawValue: "double",
            NSUnderlineStyle.styleThick.rawValue: "thick"
        ]
        static let decode: [String: NSUnderlineStyle] = [
            "single": .styleSingle,
            "double": .styleDouble,
            "thick": .styleThick
        ]
    }

    struct TextAlignment {
        static let encode: [NSTextAlignment: String] = [
            .left: "left",
            .center: "center",
            .right: "right",
            .justified: "justify"
        ]
        static let decode: [String: NSTextAlignment] = [
            "left": .left,
            "center": .center,
            "right": .right,
            "justify": .justified
        ]
    }

    struct TextDecoration {
        static let decode: [String: NSAttributedStringKey] = [
            "underline": .underlineStyle,
            "line-through": .strikethroughStyle
        ]
{'fraction_non_alphanumeric': 0.11215932914046121, 'fraction_numerical': 0.0069881201956673656, 'mean_word_length': 1.9214285714285715, 'pattern_counts': {'":': 18, '<': 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': '2090565', 'n_tokens_mistral': 854, 'n_tokens_neox': 804, 'n_words': 206}