miurahr / pykakasi

Lightweight converter from Japanese Kana-kanji sentences into Kana-Roman.
https://codeberg.org/miurahr/pykakasi
GNU General Public License v3.0
421 stars 54 forks source link

How about romaji to kanji? #148

Closed ymzlygw closed 3 years ago

ymzlygw commented 3 years ago

Hi, I want to know is there any way to convert romaji to kanji?

miurahr commented 3 years ago

Japanese kanji->romaji is one-way conversion. So reverse is not possible (there is no correct way).

For example, watashihaishaheitta.

can be 私は医者へ行った。 わたし歯医者へいった。 ....etc..

ymzlygw commented 3 years ago

ishaheit

Yes, I got it , but what if I have cut the 'watashihaishaheitta' to 'wa ta shi ha isha he itta' before using tool like Mecab, is there anyway to convert it?

miurahr commented 3 years ago

Converting Romaji to kanji is known as Kana-Kanji conversion system and theorem, as you may know input method system. You can try google input tools on android, kotoeri on apple, or SKK on unix.

You may be interested it. https://stackoverflow.com/questions/52532440/skk-for-kana-to-kanji-inverter

Unfortunately or fortunately, all of them are out of scope of pykakasi.

ymzlygw commented 3 years ago

Converting Romaji to kanji is known as Kana-Kanji conversion system and theorem, as you may know input method system. You can try google input tools on android, kotoeri on apple, or SKK on unix.

You may be interested it. https://stackoverflow.com/questions/52532440/skk-for-kana-to-kanji-inverter

Unfortunately or fortunately, all of them are out of scope of pykakasi.

Thanks, I'll try it!

miurahr commented 3 years ago

Here web site demonstrate what you want using Google input API or mecab-skkserv https://anti.rosx.net/etc/tools/rome.php