KanaRoma
Library to convert Japanese characters between kana-moji and roman-moji. You can convert both from kana to roman and roman to kana.
Installation
If available in Hex, the package can be installed
by adding kana_roma
to your list of dependencies in mix.exs
:
def deps do
[
{:kana_roma, "~> 0.1.0"}
]
end
Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/kana_roma.
Usage
Use kana2roma
to convert kana characters to roman characters,
and use roma2kana
to convert roman characters to kana characters.
Characters which can not be converted are to be original characters(as-is).
iex> KanaRoma.kana2roma "あいう azAZ09% azAZ09、。 わをん"
"aiu azAZ09% azAZ09、。 wawon"
iex> KanaRoma.roma2kana "aiu azAZ09% azAZ09、。 wawon"
"あいう あzAZ09% azAZ09、。 わをん"
License
Copyright(c) 2018 aratakokubun Licensed under the MIT license.