1

I am very much a beginner, and one of my learning methods is to listen to audio and follow along in text. But generally, my texts are in Hànzì.

It's easy enough to convert Hànzì to pīnyīn but I want to start getting familiar with the Hànzì also. Manually merging Hànzì and pīnyīn into ruby tags looks like a tedious job. I could write a program to do it, but I suspect someone already has done so. However, thanks to the programming language called Ruby, finding it in a web search is the proverbial "needle in haystack."

I realize that such a program could get up to 23% wrong, but manually correcting such errors will be far less tedious than manually generating the entire document. Using a font with the Ruby built-in is undesirable because then the errors cannot be corrected.

I understand that Firefox and Opera support is lagging, but since the results are for my own use, that doesn't matter. (And if I ever need to pass on a conversion, I can print to PDF.)_

So, where can I find such a converter? Or if someone is working on one, perhaps I could help.

I see that Japanese.SE has a markup for furigana that has a much simpler syntax than HTML5's Ruby.

  • Since I am such a beginner, answers or cited sources in Chinese are better than nothing, but English or Spanish would be much easier. – 伟思礼 Nov 15 '17 at 17:03
  • The generator can not be 100% correct, beside the quality of source character list, 多音字, neural tone is a problem, 分词 systems could help, but, I would choose books with pinyin for learners to save troubles. – Jacob Nov 16 '17 at 6:43
  • @Jacob: My third paragraph already says that. "books with pinyin" do not contain the text my first paragraph says I want to use. Also, I can't afford to load up my backpack with a bunch of books. – 伟思礼 Nov 16 '17 at 13:32
  • Then you can find some audio books, use the tool introduced by @halfelf to generate pinyins. Or you can find a lot of dictionary chrome extensions, you can fork it to generate pinyin instead of translate it, wait, I have made one before, but it only counts the frequencies of pinyin letter as a results – Jacob Nov 16 '17 at 13:54
  • I found my project, it is still works, XD, but it was made 1 years before, the source code is just a totally mess..., 0.js, 1.js, something like that, I'd better stay away from it. – Jacob Nov 16 '17 at 14:05
2

Try to search harder. I only typed "generate pinyin ruby markup" in google and found this:

az

The same search string in DuckDuckGo yielded

Key

  • Interesting. I'm pretty sure that's one of the search strings I tried. If it works, this is the answer. If it doesn't, chances are I can fix it. Thanks! – 伟思礼 Nov 16 '17 at 13:36
  • Well, I tried that search string today and got different results than yesterday. Maybe there was something different about the string yesterday. 'az' still wasn't there, but perhaps that's because I used DuckDuckGo instead of Google. What WAS there is extremely interesting: cjkware.com/faq Sounds like it does everything—except the one thing I was looking for! – 伟思礼 Nov 16 '17 at 15:17
  • Key DOES generate ruby—but VERY poorly formatted. It may have value for other things, but it is a disaster for ruby. So that makes 'az' the only real answer so far. – 伟思礼 Nov 17 '17 at 2:04
  • A retraction to my previous comment. Key did generate really bad format, but it was on one particular setting, and when I mentioned it to the developer, it was fixed within hours. I resent large companies making us their unpaid quality control. I don’t mind so much when the developer is a single person. So ‘az’ is one answer, but KEY is another. – 伟思礼 Nov 19 '17 at 17:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.