MauveCloud's Browser Tests: Romaji Conversion
MauveCloud's Browser Tests
Up: Character Set Tests
created a list of romaji sequences so that it will do something with every
letter in the input string (usually by guessing at missing vowels), though the
results won't always make sense, and I have added a number of sequences that
may not be officially accepted in Japan. This version uses if/elseif
constructs, so it should be quite fast.
This is partially inspired by the romaji converter that is built into
Jim Breen's WWWJDIC Japanese-English Dictionary Server, and I think
anything that converter can handle will be done the same way by this one (such
as "x" for small forms, the voiced forms of "ti/chi" and "tu/tsu", and a hyphen
for the katakana long vowel mark), but this one is a bit more powerful.
- Support for apostrophes to distinguish certain kana sequences that
require small kana vowels. Some examples are "t'i", "t'u", "s'i", and "w'i".
For such sequences, any vowel can be used after the apostrophe, even if using
the associated small kana vowel doesn't make sense, such as "s'u". An
apostrophe after "n" forces the use of the syllabic "n" kana. Other apostrophes
will usually be left in the hiragana.
- Vowel guessing: if a consonant sound other than "n" is at the end of the
word or followed by another consonant, the default kana for that consonant will
be used (usually the one ending in "u"). However, "m" will be converted to the
"n" kana only before "b", "m", and "p".
- The letter "x" will act like "kisu" if not followed by something that can
be converted to small kana. I have also added "x'" to get "kis" + vowel sound.
For example, the katakana sequence for Texas can be obtained by entering
- The sequence "ck" is an alternate for "kk".
- The letter "l" can be used in place of "r", though "rl" is allowed for
double-consonants, but not "lr".
- The sequences "kw" and "qu" can be used for "ku" + small kana vowel.
Sequences "gw", "ts", and "tw" are also supported, and "k" can be used in front
of a "q" sequence.
- The Japanese comma and period can be generated in the sequence by using
their English equivalents in the "Romaji" field. If an English period is
required, such as for separating the stem from the okurigana when searching a
kanji dictionary, use "\.".
- Long vowels are automatically given the long vowel mark in the katakana
even if a hyphen was not used in the romaji. This version can also handle
traditional romaji with circumflexes or macron accents, though it will always
treat "ô" like "ou" for the hiragana, but like "o-" for katakana.
If you have any questions or suggestions (esp. additions or corrections), you
can e-mail me: mauvecloud at mauvecloud dot net (I won't make
this a mailto link, as that would merely encourage spam generators).