diff options
author | polwex <polwex@sortug.com> | 2025-08-16 15:50:10 +0700 |
---|---|---|
committer | polwex <polwex@sortug.com> | 2025-08-16 15:50:10 +0700 |
commit | 7f2cdbe5da583010466d725197137f503e1fb771 (patch) | |
tree | 09e10e50aed0fe3fc11139163fbca165fb9fe814 /src/lib/types/phonetics.ts | |
parent | 274a7bbb1f82e99cdc9876f6d0de430585282797 (diff) |
damn good
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, +}; |