diff options
Diffstat (limited to 'src/lib/types/phonetics.ts')
-rw-r--r-- | src/lib/types/phonetics.ts | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/lib/types/phonetics.ts b/src/lib/types/phonetics.ts index f7289c7..1d0db5a 100644 --- a/src/lib/types/phonetics.ts +++ b/src/lib/types/phonetics.ts @@ -24,3 +24,28 @@ export type Syllable = { export type ToneQuery = Array<string | null>; export type MutationType = { change: string } | { keep: string }; export type MutationOrder = MutationType[]; + +export type PhoneticData = { + word_id: number; + tone_sequence: string; + syllable_count: number; + syl_seq: string; + spelling: string; + ipa: string; + frequency: number; +}; + +export const thaiTones: Record<string, string> = { + "˧": "mid", + "˨˩": "low", + "˥˩": "falling", + "˦˥": "high", + "˩˩˦": "rising", +}; +export const thaiToneNums: Record<string, number> = { + "˧": 33, + "˨˩": 21, + "˥˩": 41, + "˦˥": 45, + "˩˩˦": 214, +}; |