ref: af5839e3eaea9164294fd968e91aa1cec29d2431
dir: /doc/to-kana.ms/
.AU Ethan Long .TL .CW to-kana , a program for converting romaji to kana. .AB .CW to-kana converts a incoming stream of romaji to either hiragana or katakana either from a file, or from standard input, and outputs to a file or standard output. .CW to-kana aims to be as modular as possible, it should be usable for any project that requires a stream of romaji to be converted. .AE .SH Purpose in .CW nIME .PP .CW nIME uses .CW to-kana to convert the stream of keyboard inputs into basic kana for .CW to-kanji to then convert to kanji. .CW to-kana plays a very pivotal role in .CW nIME , without it no kana conversion could take place. .SH Usage .PP .CW to-kana takes in a very rigid but simple form of romaji, every character except the basic vowels takes two letters to type. The style is most similar to the ``modern'' IME, rather than .CW ktrans ' SKK format. Some examples of common usage: .ce 4 \f(CWwatashi\fR → \f(Jpわたし\fR \f(CWkorega!epikku!desu\fR → \f(Jpこれがエピックです\fR \f(CWnannde\fR → \f(Jpなんで\fR \f(CWdonnna\fR → \f(Jpどんな\fR As one can see from this usage, the common letters all take two keystrokes to type. .TS c|c c|c c|c c|c c|c c|c c|c. \f(Jp日本語\fR \f(Jpロマ字\fR \f(Jpあ\fR a \f(Jpか\fR ka \f(Jpきゃ\fR kya \f(Jpっか\fR kka \f(Jpっきゃ\fR kkya \f(Jpん\fR nn .TE In the raw stream, .CW ! is used as a placeholder for the katakana trigger character, .CW nIME 's GUI will trigger said placeholder when conversion is requested. .SH Technical documentation .PP All the functions in .CW to-kana serve the purposes of the .CW eval function. The eval function takes in a file pointer and converts the contents assuming that they are in the previously described romaji form.