diff options
| author | Alexander Kassouni <alex@kassouni.net> | 2026-09-05 22:43:52 -0700 |
|---|---|---|
| committer | Alexander Kassouni <alex@kassouni.net> | 2026-09-05 22:43:52 -0700 |
| commit | 24ec2a92b56ca4296fe65b70524e36a8e1c67c2e (patch) | |
| tree | 51fd27e87cbd419ab74f016852fbaa2d86babd9a /src/phonemes/digraph.rs | |
| parent | 7f5dd54c60c70f29d0c8abedc28dd5ed199de94d (diff) | |
phonemes
Diffstat (limited to 'src/phonemes/digraph.rs')
| -rw-r--r-- | src/phonemes/digraph.rs | 118 |
1 files changed, 118 insertions, 0 deletions
diff --git a/src/phonemes/digraph.rs b/src/phonemes/digraph.rs new file mode 100644 index 0000000..c332520 --- /dev/null +++ b/src/phonemes/digraph.rs @@ -0,0 +1,118 @@ +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +#[allow(non_camel_case_types)] +pub enum Digraph { + AI, + AL, + AN, + AR, + AS, + BE, + BY, + CH, + DO, + EA, + ER, + FA, + FO, + GE, + GO, + HA, + HE, + HI, + HO, + I_, + IF, + IN, + IR, + IS, + IT, + KS, + ME, + MY, + NA, + NG, + NO, + OF, + OH, + OK, + ON, + OO, + OR, + OU, + OW, + OY, + RE, + SE, + SH, + SI, + SO, + SU, + TH, + TO, + UP, + WE, + WO, + YOU, + ZE, +} + +impl Digraph { + pub const fn code(self) -> u8 { + use Digraph::*; + match self { + AI => 0x0F, + AL => 0x02, + AN => 0x39, + AR => 0x16, + AS => 0x3A, + BE => 0x3B, + BY => 0x3C, + CH => 0x08, + DO => 0x3D, + EA => 0x15, + ER => 0x0D, + FA => 0x35, + FO => 0x34, + GE => 0x17, + GO => 0x3E, + HA => 0x3F, + HE => 0x40, + HI => 0x41, + HO => 0x42, + I_ => 0x05, + IF => 0x43, + IN => 0x44, + IR => 0x0C, + IS => 0x45, + IT => 0x46, + KS => 0x31, + ME => 0x47, + MY => 0x48, + NA => 0x38, + NG => 0x1C, + NO => 0x49, + OF => 0x4A, + OH => 0x4B, + OK => 0x4C, + ON => 0x4D, + OO => 0x2A, + OR => 0x2C, + OU => 0x20, + OW => 0x06, + OY => 0x1F, + RE => 0x0E, + SE => 0x37, + SH => 0x24, + SI => 0x36, + SO => 0x4F, + SU => 0x25, + TH => 0x28, + TO => 0x50, + UP => 0x51, + WE => 0x52, + WO => 0x33, + YOU => 0x77, + ZE => 0x32, + } + } +} |