diff --git a/examples/polarian-handwritten-rules.json b/examples/polarian-handwritten-rules.json new file mode 100644 index 0000000..8d6f55b --- /dev/null +++ b/examples/polarian-handwritten-rules.json @@ -0,0 +1,250 @@ +{ + "phonologies": [], + "generators": [ + { "id": "polarian-handwritten", + "description": "An handwritten rule-based generator for Polarian.", + "phonology": "polarian", + "type": "rules", + "rules": [ + { "id": "-CFR", + "description": "Consonant that can be followed by a r-r", + "distribution": [ + { "pattern": ["f-f"], "occurences": 1 }, + { "pattern": ["b-b"], "occurences": 1 }, + { "pattern": ["t-t"], "occurences": 1 }, + { "pattern": ["v-v"], "occurences": 1 }, + { "pattern": ["p-p"], "occurences": 1 }, + { "pattern": ["d-d"], "occurences": 1 } + ] + }, + { "id": "-CFL", + "description": "Consonant that can be followed by a l-l", + "distribution": [ + { "pattern": ["c-k"], "occurences": 1 }, + { "pattern": ["g-g"], "occurences": 1 } + ] + }, + { "id": "-CSI", + "description": "Consonant, syllable initial", + "distribution": [ + { "pattern": ["m-m"], "occurences": 1 }, + { "pattern": ["n-n"], "occurences": 1 }, + { "pattern": ["v-v"], "occurences": 1 }, + { "pattern": ["j-Z"], "occurences": 1 }, + { "pattern": ["d-d"], "occurences": 1 }, + { "pattern": ["l-l"], "occurences": 1 }, + { "pattern": ["p-p"], "occurences": 1 }, + { "pattern": ["f-f"], "occurences": 1 }, + { "pattern": ["b-b"], "occurences": 1 }, + { "pattern": ["t-t"], "occurences": 1 }, + { "pattern": ["-CFR", "r-r"], "occurences": 1 }, + { "pattern": ["-CFL", "l-l"], "occurences": 1 } + ] + }, + { "id": "-CSIA", + "description": "Consonant, syllable initial, before Vowel of type A", + "distribution": [ + { "pattern": ["-CSI"], "occurences": 12 }, + { "pattern": ["c-k"], "occurences": 1 }, + { "pattern": ["g-g"], "occurences": 1 } + ] + }, + { "id": "-CSIE", + "description": "Consonant, syllable initial, before Vowel of type E", + "distribution": [ + { "pattern": ["-CSI"], "occurences": 12 }, + { "pattern": ["c-s"], "occurences": 1 }, + { "pattern": ["gu-g"], "occurences": 1 } + ] + }, + { "id": "CNWIA", + "description": "Consonant, syllable initial, non-word initial, before Vowel of type A", + "distribution": [ + { "pattern": ["-CSIA"], "occurences": 14 }, + { "pattern": ["r-r"], "occurences": 1 }, + { "pattern": ["lh-lh"], "occurences": 1 } + ] + }, + { "id": "CNWIE", + "description": "Consonant, syllable initial, non-word initial, before Vowel of type E", + "distribution": [ + { "pattern": ["-CSIE"], "occurences": 14 }, + { "pattern": ["r-r"], "occurences": 1 }, + { "pattern": ["lh-lh"], "occurences": 1 } + ] + }, + { "id": "CWIA", + "description": "Consonant, word initial, before Vowel of type A", + "distribution": [ + { "pattern": ["-CSIA"], "occurences": 14 }, + { "pattern": ["r-R"], "occurences": 1 }, + { "pattern": ["s-s"], "occurences": 1 } + ] + }, + { "id": "CWIE", + "description": "Consonant, word initial, before Vowel of type E", + "distribution": [ + { "pattern": ["-CSIE"], "occurences": 14 }, + { "pattern": ["r-R"], "occurences": 1 }, + { "pattern": ["s-s"], "occurences": 1 } + ] + }, + { "id": "CSF", + "description": "Consonant, syllable final", + "distribution": [ + { "pattern": ["r-r"], "occurences": 1 }, + { "pattern": ["s-S"], "occurences": 1 }, + { "pattern": ["l-L"], "occurences": 1 } + ] + }, + { "id": "-VAU", + "description": "Vowels, A/O/U, unstressed", + "distribution": [ + { "pattern": ["a-a"], "occurences": 1 }, + { "pattern": ["o-u"], "occurences": 1 }, + { "pattern": ["o-o"], "occurences": 1 } + ] + }, + { "id": "VAUNF", + "description": "Vowels, A/O/U, unstressed, non word final", + "distribution": [ + { "pattern": ["-VAU"], "occurences": 5 }, + { "pattern": ["a~-an"], "occurences": 1 }, + { "pattern": ["u-u"], "occurences": 1 } + ] + }, + { "id": "VAUF", + "description": "Vowels, A/O/U, unstressed, word final", + "distribution": [ + { "pattern": ["-VAU"], "occurences": 5 }, + { "pattern": ["a~-an", "o-w"], "occurences": 1 }, + { "pattern": ["an-an"], "occurences": 1 } + ] + }, + { "id": "VAS", + "description": "Vowels, A/O/U, stressed", + "distribution": [ + { "pattern": ["a-A"], "occurences": 1 }, + { "pattern": ["a/-A"], "occurences": 1 }, + { "pattern": ["o/-O"], "occurences": 1 }, + { "pattern": ["o-O"], "occurences": 1 }, + { "pattern": ["a-A", "u-w"], "occurences": 1 }, + { "pattern": ["u-w", "i/-i"], "occurences": 1 } + ] + }, + { "id": "-VEU", + "description": "Vowels, E/I, unstressed", + "distribution": [ + { "pattern": ["e-I"], "occurences": 1 }, + { "pattern": ["i-i"], "occurences": 1 }, + { "pattern": ["i-j", "a-a"], "occurences": 1 }, + { "pattern": ["i-j", "o-u"], "occurences": 1 } + ] + }, + { "id": "VEUNF", + "description": "Vowels, E/I, unstressed, non word final", + "distribution": [ + { "pattern": ["-VEU"], "occurences": 7 }, + { "pattern": ["en-en"], "occurences": 1 } + ] + }, + { "id": "VEUF", + "description": "Vowels, E/I, unstressed, word final", + "distribution": [ + { "pattern": ["-VEU"], "occurences": 7 }, + { "pattern": ["im-in"], "occurences": 1 }, + { "pattern": ["i-j", "a~-an", "o-w"], "occurences": 1 }, + { "pattern": ["en-en"], "occurences": 1 } + ] + }, + { "id": "VES", + "description": "Vowels, E/I, stressed", + "distribution": [ + { "pattern": ["e-E"], "occurences": 1 }, + { "pattern": ["e-e"], "occurences": 1 }, + { "pattern": ["e/-E"], "occurences": 1 }, + { "pattern": ["en-en"], "occurences": 1 }, + { "pattern": ["i-i"], "occurences": 1 }, + { "pattern": ["i/-i"], "occurences": 1 }, + { "pattern": ["i-j", "a-a"], "occurences": 1 } + ] + }, + { "id": "VWIS", + "description": "Vowel, word initial, stressed", + "distribution": [ + { "pattern": ["i/-i"], "occurences": 1 }, + { "pattern": ["e-e"], "occurences": 1 } + ] + }, + { "id": "VWIU", + "description": "Vowel, word initial, unstressed", + "distribution": [ + { "pattern": ["i-i"], "occurences": 1 }, + { "pattern": ["a-a"], "occurences": 1 } + ] + }, + + { "id": "Coda", + "description": "Coda consonant", + "distribution": [ + { "pattern": [], "occurences": 90 }, + { "pattern": ["CSF"], "occurences": 10 } + ] + }, + { "id": "UnstressedFirst", + "description": "First unstressed syllable", + "distribution": [ + { "pattern": ["VWIU"], "occurences": 20 }, + { "pattern": ["CWIA", "VAUNF"], "occurences": 40 }, + { "pattern": ["CWIE", "VEUNF"], "occurences": 40 } + ] + }, + { "id": "Unstressed", + "description": "Unstressed syllable", + "distribution": [ + { "pattern": ["CNWIA", "VAUNF"], "occurences": 1 }, + { "pattern": ["CNWIE", "VEUNF"], "occurences": 1 } + ] + }, + { "id": "OptionalUnstressed", + "description": "Optional unstressed syllable", + "distribution": [ + { "pattern": [], "occurences": 70 }, + { "pattern": [".", "Unstressed", "Coda"], "occurences": 30 } + ] + }, + { "id": "Stressed", + "description": "Stressed syllable", + "distribution": [ + { "pattern": ["CNWIA", "VAS"], "occurences": 1 }, + { "pattern": ["CNWIE", "VES"], "occurences": 1 } + ] + }, + { "id": "Initial", + "description": "First part of word, before and including stressed syllable", + "distribution": [ + { "pattern": ["'", "VWIS"], "occurences": 10 }, + { "pattern": ["'", "CWIA", "VAS"], "occurences": 35 }, + { "pattern": ["'", "CWIE", "VES"], "occurences": 35 }, + { "pattern": ["UnstressedFirst", "Coda", "OptionalUnstressed", "'", "Stressed"], "occurences": 20 } + ] + }, + { "id": "Final", + "description": "Last syllable", + "distribution": [ + { "pattern": ["CNWIA", "VAUF"], "occurences": 30 }, + { "pattern": ["CNWIE", "VEUF"], "occurences": 30 }, + { "pattern": ["CNWIA", "VAUNF", "CSF"], "occurences": 20 }, + { "pattern": ["CNWIE", "VEUNF", "CSF"], "occurences": 20 } + ] + }, + { "id": "word", + "description": "Word", + "distribution": [ + { "pattern": ["Initial", "Coda", ".", "Final"], "occurences": 1 } + ] + } + ] + } + ] +}