"""Phonological features."""

patpho_bin = (
    {
        "a": (1, 1, 1, 0, 0),
        "e": (0, 1, 1, 0, 1),
        "i": (0, 1, 0, 1, 1),
        "u": (1, 0, 0, 0, 1),
        "æ": (0, 1, 1, 0, 0),
        "ɑ": (1, 0, 1, 0, 0),
        "ɒ": (1, 0, 1, 1, 0),
        "ɔ": (1, 0, 1, 0, 1),
        "ə": (1, 1, 1, 0, 0),
        "ɛ": (0, 1, 1, 1, 0),
        "ɜ": (1, 1, 0, 0, 1),
        "ɪ": (0, 1, 0, 0, 1),
        "ʊ": (1, 0, 0, 1, 1),
        "ʌ": (1, 1, 1, 1, 0),
    },
    {
        "b": (1, 0, 0, 0, 0, 1, 0),
        "d": (1, 0, 1, 1, 0, 1, 0),
        "f": (0, 0, 0, 1, 1, 0, 0),
        "h": (0, 1, 1, 1, 0, 1, 1),
        "j": (1, 1, 0, 1, 0, 1, 1),
        "k": (0, 1, 1, 0, 0, 1, 0),
        "l": (1, 0, 1, 1, 0, 1, 1),
        "m": (1, 0, 0, 0, 0, 0, 1),
        "n": (1, 0, 1, 1, 0, 0, 1),
        "p": (0, 0, 0, 0, 0, 1, 0),
        "r": (1, 0, 1, 1, 1, 1, 0),
        "s": (0, 0, 1, 1, 1, 0, 0),
        "t": (0, 0, 1, 1, 0, 1, 0),
        "v": (1, 0, 0, 1, 1, 0, 0),
        "w": (1, 1, 1, 0, 0, 1, 1),
        "z": (1, 0, 1, 1, 1, 0, 0),
        "ð": (1, 0, 1, 0, 1, 0, 0),
        "ŋ": (1, 1, 1, 0, 0, 0, 1),
        "ɡ": (1, 1, 1, 0, 0, 1, 0),
        "ʃ": (0, 1, 0, 0, 1, 0, 0),
        "ʒ": (1, 1, 0, 0, 1, 0, 0),
        "θ": (0, 0, 1, 0, 1, 0, 0),
    },
)

patpho_real = (
    {
        "a": (0.1, 0.175, 0.444),
        "e": (0.1, 0.1, 0.27),
        "i": (0.1, 0.1, 0.1),
        "u": (0.1, 0.25, 0.1),
        "æ": (0.1, 0.1, 0.444),
        "ɑ": (0.1, 0.25, 0.444),
        "ɒ": (0.1, 0.25, 0.355),
        "ɔ": (0.1, 0.25, 0.27),
        "ə": (0.1, 0.175, 0.185),
        "ɛ": (0.1, 0.1, 0.355),
        "ɜ": (0.1, 0.175, 0.27),
        "ɪ": (0.1, 0.1, 0.185),
        "ʊ": (0.1, 0.25, 0.185),
        "ʌ": (0.1, 0.175, 0.355),
    },
    {
        "b": (0.75, 0.45, 0.733),
        "d": (0.75, 0.684, 0.733),
        "f": (1.0, 0.528, 0.822),
        "h": (1.0, 1.0, 0.911),
        "j": (0.75, 0.841, 0.911),
        "k": (1.0, 0.921, 0.733),
        "l": (0.75, 0.684, 1.0),
        "m": (0.75, 0.45, 0.644),
        "n": (0.75, 0.684, 0.644),
        "p": (1.0, 0.45, 0.733),
        "r": (0.75, 0.684, 0.911),
        "s": (1.0, 0.684, 0.822),
        "t": (1.0, 0.684, 0.733),
        "v": (0.75, 0.528, 0.822),
        "w": (0.75, 0.921, 0.911),
        "z": (0.75, 0.684, 0.822),
        "ð": (0.75, 0.606, 0.822),
        "ŋ": (0.75, 0.921, 0.644),
        "ɡ": (0.75, 0.921, 0.733),
        "ʃ": (1.0, 0.762, 0.822),
        "ʒ": (0.75, 0.762, 0.822),
        "θ": (1.0, 0.606, 0.822),
    },
)

binary_features = {
    "alveolar": (0, 1, 1),
    "approximant": (0, 0, 1, 1),
    "back": (1, 0),
    "bilabial": (0, 0, 0),
    "central": (1, 1),
    "close": (1, 0, 0),
    "close-mid": (1, 1, 0),
    "dental": (0, 1, 0),
    "fricative": (0, 1, 0, 0),
    "front": (0, 1),
    "glottal": (1, 1, 1),
    "labio-dental": (0, 0, 1),
    "labio-velar": (1, 1, 0),
    "lateral": (0, 1, 1, 0),
    "lateral-approximant": (0, 0, 1, 1),
    "mid": (1, 0, 1),
    "nasal": (0, 0, 0, 1),
    "near-back": (1, 0),
    "near-close": (1, 0, 0),
    "near-front": (0, 1),
    "near-open": (0, 1, 1),
    "non-sibilant-fricative": (0, 1, 0, 0),
    "open": (0, 1, 1),
    "open-mid": (0, 0, 1),
    "palatal": (1, 0, 1),
    "palato-alveolar": (1, 0, 0),
    "plosive": (1, 0, 0, 0),
    "sibilant-fricative": (0, 1, 0, 0),
    "stop": (0, 0, 1, 0),
    "trill": (1, 0, 0, 1),
    "velar": (1, 1, 0),
    "voiced": (0,),
    "voiceless": (1,),
}

dislex_features = {
    "alveolar": (0.500,),
    "approximant": (0.500,),
    "back": (1.000,),
    "bilabial": (0.125,),
    "central": (0.600,),
    "close": (0.143,),
    "close-mid": (0.286,),
    "dental": (0.375,),
    "fricative": (0.333,),
    "front": (0.2,),
    "glottal": (1.000,),
    "labio-dental": (0.250,),
    "labio-velar": (0.875,),
    "lateral": (0.667,),
    "lateral-approximant": (0.375,),
    "mid": (0.571,),
    "nasal": (0.833,),
    "near-back": (0.9,),
    "near-close": (0.200,),
    "near-front": (0.1,),
    "near-open": (0.857,),
    "non-sibilant-fricative": (0.333,),
    "open": (1.0,),
    "open-mid": (0.857,),
    "palatal": (0.75,),
    "palato-alveolar": (0.625,),
    "plosive": (0.167,),
    "sibilant-fricative": (0.333,),
    "stop": (0.167,),
    "trill": (0.167,),
    "velar": (0.875,),
    "voiced": (1.00,),
    "voiceless": (0.0,),
}

plunkett_phonemes = (
    {
        "e": (1, 1, 1, 1, 1, 0),
        "i": (1, 1, 1, 1, 1, 1),
        "o": (1, 1, 1, 0, 1, 1),
        "u": (1, 1, 1, 1, 0, 1),
        "y": (0, 1, 0, 1, 0, 0),
        "æ": (1, 1, 0, 1, 0, 0),
        "ɔ": (1, 1, 0, 0, 0, 0),
        "ɛ": (1, 1, 1, 0, 0, 0),
        "ɪ": (1, 1, 0, 0, 1, 1),
        "ʊ": (1, 1, 0, 0, 0, 1),
        "ʌ": (1, 1, 0, 1, 1, 1),
    },
    {
        "b": (0, 1, 1, 1, 1, 1),
        "d": (0, 1, 1, 1, 1, 0),
        "f": (0, 0, 1, 0, 1, 1),
        "h": (0, 0, 0, 1, 0, 0),
        "k": (0, 0, 1, 1, 0, 0),
        "l": (0, 1, 0, 1, 1, 0),
        "m": (0, 1, 0, 0, 1, 1),
        "n": (0, 1, 0, 0, 1, 0),
        "p": (0, 0, 1, 1, 1, 1),
        "r": (0, 1, 0, 1, 0, 1),
        "s": (0, 1, 1, 0, 0, 1),
        "t": (0, 0, 1, 1, 1, 0),
        "w": (0, 1, 0, 1, 1, 1),
        "z": (0, 1, 1, 0, 0, 1),
        "ð": (0, 0, 1, 0, 1, 0),
        "ŋ": (0, 1, 0, 0, 0, 0),
        "ɡ": (0, 1, 1, 1, 0, 0),
        "θ": (0, 1, 1, 0, 1, 0),
    },
)
