Jump to content
Chinese-Forums
  • Sign Up

Online API for Hanzi-to-Pinyin conversion


Recommended Posts

Posted

I've seen a few threads about Hanzi-to-Pinyin conversion but they talk about various websites rather than APIs that can be accessed using something like JSON.

I know you can access Google Translate using JSON and that Google Translate provides pinyin romanization of Hanzi, but is it possible to access that through JSON also?

Alternatively I could just build my own offline converter based on CC-CEDICT data. It wouldn't be perfect but probably good enough for my needs. In cases where a character maps to multiple pinyins I would just use the most common one.

How does that sound?

Posted

In cases where a character maps to multiple pinyins I would just use the most common one. --------> The problem lies in such cases are very common. The precision would be depressive.

A better process recommendated is:

1. Making word segmentation on input sentences. (Unlike English, a Chinese sentence should be splitted into a token sequence.)

2. Map each word to pinyin. The map is often unique. The technique is state-of-the-art. And we have collect such mapping list before.

Posted

Have a look at Adsotrans - if they're not doing it, I doubt anyone else is.

Posted

Yeah, I think that adsotrans does exactly this, and should be considerably more accurate than a CEDICT-based character-for-character conversion.

Join the conversation

You can post now and select your username and password later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Click here to reply. Select text to quote.

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...