#[repr(u8)]
pub enum Vowel {
A,
A6,
A8,
E,
E6,
I,
O,
O6,
O7,
U,
U7,
Y,
Ai,
Ao,
Au,
A6u,
Ay,
A6y,
Eo,
E6u,
Ia,
Ie6,
Ye6,
Iu,
Oa,
Oa8,
Oe,
Oi,
O6i,
O7i,
Oo,
O6o6,
Ua,
Ua8,
Ua6,
U7a,
Ue6,
Ui,
U7i,
Uo,
Uo6,
Uo7,
U7o7,
U7u,
Uy,
Ie6u,
Ye6u,
Oai,
Oao,
Oay,
Oeo,
Uao,
Ua6y,
Uo6i,
U7o7i,
U7o7u,
Uya,
Uye6,
Uyu,
}
Lists all vowels (nguyên âm) in Vietnamese.
In terms of writing, there are 3 kinds of vowel:
-
Elemental vowel (monophthongs or nguyên âm đơn)
There are 12 elemental vowels:
- a, ă, â,
- e, ê,
- i/y,
- o, ô, ơ,
- u, ư.
-
Diphthong (nguyên âm đôi hay trùng nhị âm)
There are 32 diphthongs:
- ai, ao, au, âu, ay, ây,
- eo, êu,
- ia, iê/yê, iu,
- oa, oă, oe, oi, ôi, ơi, oo, ôô,
- ua, uă, uâ, ưa, uê, ui, ưi,uo, uô, uơ, ươ, ưu, uy
-
Triphthong (nguyên âm ba hay trùng tam âm)
There are 13 triphthongs:
- iêu/yêu,
- oai, oao, oay, oeo,
- uao, uây, uôi, ươi, ươu, uya, uyê, uyu
There are 12 vowels: ă, â, iê, oă, oo, ôô, uâ, uă, uô, ươ, uyê, yê,
must be followed by another vowel or consonant based on this rule:
- Final consonant only: ă, oă, oo, ôô, uă, uyê.
- Either a vowel or final consonant: â, iê, uâ, uô, ươ, yê.
There are 4 diphthongs that are free. They can be freestanding,
be followed by initial, final or both consonant kinds: oa, oe, uê, uy.
Hence, there are only 31 composite vowels without final consonant:
- ai, ao, au, âu, ay, ây,
- eo, êu.
- ia, iêu/yêu, iu,
- oi, ôi, ơi, oai, oao, oay, oeo,
- ua, ưa, ui, ưi, ưu, uơ, uây, uôi, ươi, ươu, uya, uyu.
Check if vowel must be followed by another vowel or a consonant.
assert!(Vowel::A6.must_or_with_vowel());
assert!(!Vowel::Oai.must_or_with_vowel());Run
Check if vowel must be only followed by a consonant.
assert!(!Vowel::A6.must_with_final_consonant());
assert!(Vowel::Oa8.must_with_final_consonant());Run
Check if vowel is without final consonant.
assert!(!Vowel::A6.must_without_final_consonant());
assert!(Vowel::Ai.must_without_final_consonant());Run
Check if diphthong is free. Those diphthongs are: oa, oe, uê, uy.
assert!(!Vowel::A6.is_free_diphthong());
assert!(Vowel::Oa.is_free_diphthong());Run
Check if vowel is elemental (or primary, basic).
assert!(Vowel::Y.is_elemental());
assert!(!Vowel::Ai.is_elemental());
assert!(!Vowel::Oai.is_elemental());Run
Check if vowel is a diphthong.
assert!(!Vowel::Y.is_dipthong());
assert!(Vowel::Ai.is_dipthong());
assert!(!Vowel::Oai.is_dipthong());Run
Check if vowel is a triphthong.
assert!(!Vowel::Y.is_triphthong());
assert!(!Vowel::Ai.is_triphthong());
assert!(Vowel::Oai.is_triphthong());Run
Formats the value using the given formatter. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Mutably borrows from an owned value. Read more