开发者

Any tools to programmatically convert Japanese sentence into its romaji (phonetical reading)? [closed]

开发者 https://www.devze.com 2023-03-02 00:43 出处:网络
Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed. This question is off-topic. It is not currently accepting answers.

Want to improve this question? Update the question so it's on-topic for Stack Overflow.

Closed 10 years ago.

开发者_开发知识库 Improve this question

Input:

日本が好きです.

Output:

Nippon ga sukidesu.

Phonetical reading is unfortunately not available through Google Translate API.


KAKASI is a good, simple tool for what you want to do:

% echo "日本が好きです。" | iconv -f utf8 -t eucjp | kakasi -i euc -Ha -Ka -Ja -Ea -ka
nippongasukidesu.

% echo "日本が好きです。" | iconv -f utf8 -t eucjp | kakasi -i euc -w | kakasi -i euc -Ha -Ka -Ja -Ea -ka
nippon ga suki desu .

Or another solution is to use Yahoo! JAPAN's Japanese Language Processing API. But it might be difficult to use because you need to sign up for Yahoo! JAPAN and register for the API key before using it and the documents are only available in Japanese.


Phonetical reading is unfortunately not available through Google Translate API.

Google translate does have that feature - Copy and paste that string into the box, and click "Read Phonetically" which is directly underneath the input text field. It will show you your exact output. It can also verbally read that string to you if you click "Listen".

http://translate.google.com/#

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号