← Back
Hawaiian Pronunciation Converter
Convert Hawaiian words to phonetic pronunciation.
Hawaiian Alphabet
12 letters: a, e, i, o, u, p, k, h, l, m, n, w (plus space and apostrophe)
Pronunciation Rules
Vowels
- a → ah
- e → eh
- i → ee
- o → oh
- u → oo
Consonants
- p, k, h, l, m, n: Same as English
- w at start of word: 'w'
- w after a, u, o: 'w'
- w after i or e: 'v'
Diphthongs (Vowel Pairs)
- ai, ae → eye
- ao, au, ou → ow
- ei → ay
- eu → eh-oo
- iu → ew
- oi → oy
- ui → ooey
Constraints
- No
.replace()method - Only arrays (no maps, vectors)
- Use
size_tfor loop indices when comparing withstring.size()
Output
- All output is lowercase regardless of input case
- Invalid characters produce:
{input} contains invalid characters.
Examples
- aloha → ah-loh-hah
- Maui → mow-ee
- humuhumunukunukuapua'a → hoo-moo-hoo-moo-noo-koo-noo-koo-ah-poo-ah'ah
Sample Test Cases
85 tests
Single Vowels (5)
| Input | Expected Output |
|---|---|
a |
ah |
e |
eh |
i |
ee |
o |
oh |
u |
oo |
Consonant + Vowel (6)
| Input | Expected Output |
|---|---|
pa |
pah |
ka |
kah |
ha |
hah |
la |
lah |
ma |
mah |
| +1 more hidden | |
W Consonant Rules (6)
| Input | Expected Output |
|---|---|
wa |
wah |
awa |
ah-wah |
iwa |
ee-vah |
ewa |
eh-vah |
uwa |
oo-wah |
| +1 more hidden | |
Diphthongs (10)
| Input | Expected Output |
|---|---|
ai |
eye |
ae |
eye |
ao |
ow |
au |
ow |
ei |
ay |
| +5 more hidden | |
Non-Diphthong Pairs (9)
| Input | Expected Output |
|---|---|
oa |
oh-ah |
ia |
ee-ah |
ea |
eh-ah |
ua |
oo-ah |
aa |
ah-ah |
| +4 more hidden | |
3+ Consecutive Vowels (4)
| Input | Expected Output |
|---|---|
aia |
eye-ah |
uaa |
oo-ah-ah |
oai |
oh-eye |
auo |
ow-oh |
Document Examples (7)
| Input | Expected Output |
|---|---|
aloha |
ah-loh-hah |
keiki |
kay-kee |
Maui |
mow-ee |
Hoaloha |
hoh-ah-loh-hah |
Kaiapuni |
keye-ah-poo-nee |
| +2 more hidden | |
Apostrophe Handling (5)
| Input | Expected Output |
|---|---|
a'i |
ah'ee |
a'e |
ah'eh |
o'o |
oh'oh |
ka'u |
kah'oo |
pua'a |
poo-ah'ah |
Space Handling (2)
| Input | Expected Output |
|---|---|
aloha oe |
ah-loh-hah oh-eh |
e komo mai |
eh koh-moh meye |
Case Handling (4)
| Input | Expected Output |
|---|---|
ALOHA |
ah-loh-hah |
Aloha |
ah-loh-hah |
AI |
eye |
Ei |
ay |
Invalid Input Detection (4)
| Input | Expected Output |
|---|---|
cafe |
cafe contains invalid characters. |
aloha! |
aloha! contains invalid characters. |
abc |
abc contains invalid characters. |
123 |
123 contains invalid characters. |
Edge Cases (7)
| Input | Expected Output |
|---|---|
(empty) |
(empty) |
p |
p |
ppp |
ppp |
aaa |
ah-ah-ah |
aaaa |
ah-ah-ah-ah |
| +2 more hidden | |
Real Hawaiian Words (16)
| Input | Expected Output |
|---|---|
mahalo |
mah-hah-loh |
wiki |
wee-kee |
hula |
hoo-lah |
lei |
lay |
luau |
loo-ow |
| +11 more hidden | |
main.cpp
Click Run to compile and execute with this input