有什么工具可以将日语句子以编程方式转换为罗马字(语音阅读)吗? [英] Any tools to programmatically convert Japanese sentence into its romaji (phonetical reading)?

查看:138
本文介绍了有什么工具可以将日语句子以编程方式转换为罗马字(语音阅读)吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

输入:

日本が好きです.

日本が好きです.

输出:

日本ga sukidesu.

Nippon ga sukidesu.

不幸的是,语音翻译无法通过Google Translate API获得.

Phonetical reading is unfortunately not available through Google Translate API.

推荐答案

KAKASI 是一个很好的简单工具,可以满足您的需求:

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 .

或者另一个解决方案是使用 Yahoo! JAPAN的日语语言处理API . 但这可能很难使用,因为您需要注册Yahoo!. JAPAN并在使用前注册API密钥,并且文档仅提供日语版本.

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.

这篇关于有什么工具可以将日语句子以编程方式转换为罗马字(语音阅读)吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆