Skip to content

Commit

Permalink
style: rewrite moh_equiv and moh_to_ipa in compact form
Browse files Browse the repository at this point in the history
  • Loading branch information
joanise authored and roedoejet committed Mar 14, 2023
1 parent 8ff314f commit c781cbe
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 279 deletions.
98 changes: 19 additions & 79 deletions g2p/mappings/langs/moh/moh_equiv.json
Original file line number Diff line number Diff line change
@@ -1,80 +1,20 @@
[{
"in": "",
"out": ":"
},
{
"in": "",
"out": "-"
},
{
"in": "׃",
"out": ":"
},
{
"in": "",
"out": "'"
},
{
"in": "",
"out": "'"
},
{
"in": "òn",
"out": "òn:",
"context_after": "(CONSONANT)"
},
{
"in": "èn",
"out": "èn:",
"context_after": "(CONSONANT)"
},
{
"in": "on:",
"out": "ón:"
},
{
"in": "en:",
"out": "én:"
},
{
"in": "",
"out": "à:",
"context_after": "[^:]"
},
{
"in": "è",
"out": "è:",
"context_after": "([^:n]|n(VOWEL))"
},
{
"in": "ì",
"out": "ì:",
"context_after": "[^:]"
},
{
"in": "ò",
"out": "ò:",
"context_after": "([^:n]|n(VOWEL))"
},
{
"in": "i:",
"out": "í:"
},
{
"in": "e:",
"out": "é:"
},
{
"in": "a:",
"out": "á:"
},
{
"in": "o:",
"out": "ó:"
},
{
"in": ":",
"out": ":",
"comment": "force the tokenizer to recognize colon as a letter"
}
[
{"in": "", "out": ":"},
{"in": "", "out": "-"},
{"in": "׃", "out": ":"},
{"in": "", "out": "'"},
{"in": "", "out": "'"},
{"in": "òn", "out": "òn:", "context_after": "(CONSONANT)"},
{"in": "èn", "out": "èn:", "context_after": "(CONSONANT)"},
{"in": "on:", "out": "ón:"},
{"in": "en:", "out": "én:"},
{"in": "", "out": "à:", "context_after": "[^:]"},
{"in": "è", "out": "è:", "context_after": "([^:n]|n(VOWEL))"},
{"in": "ì", "out": "ì:", "context_after": "[^:]"},
{"in": "ò", "out": "ò:", "context_after": "([^:n]|n(VOWEL))"},
{"in": "i:", "out": "í:"},
{"in": "e:", "out": "é:"},
{"in": "a:", "out": "á:"},
{"in": "o:", "out": "ó:"},
{"in": ":", "out": ":", "comment": "force the tokenizer to recognize colon as a letter"}
]
247 changes: 47 additions & 200 deletions g2p/mappings/langs/moh/moh_to_ipa.json
Original file line number Diff line number Diff line change
@@ -1,201 +1,48 @@
[
{
"in": "ti",
"out": "d͡ʒ",
"context_after": "VOWEL"
},
{
"in": "tshi",
"out": "t͡ʃ",
"context_after": "VOWEL"
},
{
"in": "hsi",
"out": "ʃ",
"context_after": "VOWEL"
},
{
"in": "tsy",
"out": "d͡ʒ"
},
{
"in": "t",
"out": "d",
"context_after": "VOWEL"
},
{
"in": "k",
"out": "ɡ",
"context_after": "VOWEL"
},
{
"in": "kw",
"out": "ɡʷ",
"context_after": "VOWEL"
},
{
"in": "á:",
"out": "áː",
"prevent_feeding": true
},
{
"in": "à:",
"out": "àː"
},
{
"in": "a:",
"out": ""
},
{
"in": "á",
"out": "á"
},
{
"in": "a",
"out": "a"
},
{
"in": "èn:",
"out": "ʌ̃̀ː"
},
{
"in": "én:",
"out": "ʌ̃́ː"
},
{
"in": "én",
"out": "ʌ̃́",
"context_after": "CONSONANT|\\s|$"
},
{
"in": "en:",
"out": "ʌ̃ː",
"context_after": "CONSONANT|\\s|$"
},
{
"in": "en",
"out": "ʌ̃",
"context_after": "CONSONANT|\\s|$"
},
{
"in": "è:",
"out": "èː"
},
{
"in": "é:",
"out": "éː",
"prevent_feeding": true
},
{
"in": "é",
"out": "é"
},
{
"in": "e",
"out": "e"
},
{
"in": "i:",
"out": ""
},
{
"in": "í:",
"out": "íː",
"prevent_feeding": true
},
{
"in": "í",
"out": "í"
},
{
"in": "ì:",
"out": "ìː"
},
{
"in": "i",
"out": "i"
},
{
"in": "k",
"out": "k"
},
{
"in": "kw",
"out": ""
},
{
"in": "kw",
"out": "kʰʷ",
"context_after": "\\s|$"
},
{
"in": "n",
"out": "n"
},
{
"in": "ón:",
"out": "ṹː"
},
{
"in": "òn:",
"out": "ũ̀ː"
},
{
"in": "ón",
"out": "ṹ"
},
{
"in": "on",
"out": "ũ",
"context_after": "CONSONANT|\\s|$"
},
{
"in": "ó:",
"out": "óː",
"prevent_feeding": true
},
{
"in": "ò:",
"out": "òː"
},
{
"in": "ó",
"out": "ó"
},
{
"in": "o",
"out": "o"
},
{
"in": "r",
"out": "r"
},
{
"in": "h",
"out": "h"
},
{
"in": "t",
"out": "t"
},
{
"in": "s",
"out": "s"
},
{
"in": "w",
"out": "w"
},
{
"in": "wh",
"out": "f"
},
{
"in": "y",
"out": "j"
},
{
"in": "'",
"out": "ʔ"
}
]
{"in": "ti", "out": "d͡ʒ", "context_after": "VOWEL"},
{"in": "tshi", "out": "t͡ʃ", "context_after": "VOWEL"},
{"in": "hsi", "out": "ʃ", "context_after": "VOWEL"},
{"in": "tsy", "out": "d͡ʒ"},
{"in": "t", "out": "d", "context_after": "VOWEL"},
{"in": "k", "out": "ɡ", "context_after": "VOWEL"},
{"in": "kw", "out": "ɡʷ", "context_after": "VOWEL"},
{"in": "á:", "out": "áː", "prevent_feeding": true},
{"in": "à:", "out": "àː"},
{"in": "a:", "out": ""},
{"in": "á", "out": "á"},
{"in": "a", "out": "a"},
{"in": "èn:", "out": "ʌ̃̀ː"},
{"in": "én:", "out": "ʌ̃́ː"},
{"in": "én", "out": "ʌ̃́", "context_after": "CONSONANT|\\s|$"},
{"in": "en:", "out": "ʌ̃ː", "context_after": "CONSONANT|\\s|$"},
{"in": "en", "out": "ʌ̃", "context_after": "CONSONANT|\\s|$"},
{"in": "è:", "out": "èː"},
{"in": "é:", "out": "éː", "prevent_feeding": true},
{"in": "é", "out": "é"},
{"in": "e", "out": "e"},
{"in": "i:", "out": ""},
{"in": "í:", "out": "íː", "prevent_feeding": true},
{"in": "í", "out": "í"},
{"in": "ì:", "out": "ìː"},
{"in": "i", "out": "i"},
{"in": "k", "out": "k"},
{"in": "kw", "out": ""},
{"in": "kw", "out": "kʰʷ", "context_after": "\\s|$"},
{"in": "n", "out": "n"},
{"in": "ón:", "out": "ṹː"},
{"in": "òn:", "out": "ũ̀ː"},
{"in": "ón", "out": "ṹ"},
{"in": "on", "out": "ũ", "context_after": "CONSONANT|\\s|$"},
{"in": "ó:", "out": "óː", "prevent_feeding": true},
{"in": "ò:", "out": "òː"},
{"in": "ó", "out": "ó"},
{"in": "o", "out": "o"},
{"in": "r", "out": "r"},
{"in": "h", "out": "h"},
{"in": "t", "out": "t"},
{"in": "s", "out": "s"},
{"in": "w", "out": "w"},
{"in": "wh", "out": "f"},
{"in": "y", "out": "j"},
{"in": "'", "out": "ʔ"}
]

0 comments on commit c781cbe

Please sign in to comment.