https://github.com/bdusell/romaji-cpp
Kana-to-romaji converter
https://github.com/bdusell/romaji-cpp
c-plus-plus converter hiragana japanese kana katakana romaji
Last synced: 6 months ago
JSON representation
Kana-to-romaji converter
- Host: GitHub
- URL: https://github.com/bdusell/romaji-cpp
- Owner: bdusell
- License: mit
- Created: 2013-09-28T04:40:49.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2014-03-15T00:03:37.000Z (almost 12 years ago)
- Last Synced: 2025-06-20T06:07:12.981Z (6 months ago)
- Topics: c-plus-plus, converter, hiragana, japanese, kana, katakana, romaji
- Language: C++
- Homepage:
- Size: 160 KB
- Stars: 11
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
romaji-cpp
==========
This is a small C++ library and accompanying driver program which
transliterates UTF-8 strings of kana (Japanese phonetic characters) into romaji
(Latin letters). Special care was taken to handle all variety of inputs,
including some exotic edge cases.
The driver program `kana_to_romaji` is a command-line tool which converts its
argument from a UTF-8 encoded string of kana into romaji on `stdout`. It is built
with
make
or
make kana_to_romaji
To build the driver program and perform unit tests, use
make test
Example Usage
-------------
Simple cases work as is to be expected.
./kana_to_romaji ひらがな
hiragana
./kana_to_romaji カタカナ
katakana
./kana_to_romaji はっぴょう
happyou
./kana_to_romaji つくって
tsukutte
./kana_to_romaji ふじさん
fujisan
./kana_to_romaji ぎゅうにゅう
gyuunyuu
./kana_to_romaji じんじゃ
jinja
Special consonant-vowel combinations which are not common to native Japanese
words work as well.
./kana_to_romaji パーティー
paatii
./kana_to_romaji タトゥー
tatuu
./kana_to_romaji クァルテット
kwarutetto
Perhaps one of the more interesting cases is the various spellings of "Whiskey."
./kana_to_romaji ウィスキー
wisukii
./kana_to_romaji ウイスキー
uisukii
./kana_to_romaji ウヰスキー
uwisukii