Jump to content
Learn Chinese in China
  • Why you should look around

    Since 2003, Chinese-forums.com has been helping people learn Chinese faster and get to China sooner. Our members can recommend beginner textbooks, help you out with obscure classical vocabulary, and tell you where to get the best street food in Xi'an. And we're friendly about it too. 

    Have a look at what's going on, or search for something specific. We hope you'll join us. 

ZDT 0.9.0x - three Pinyin Questions

Recommended Posts

mvdberg112    7

As feedback on ZDT v0.9.0, I have three pinyin questions:

#1 Should pinyin should be able to contain an apostrophe [']?

For example, many books put an apostrophe before a pinyin-syllable that starts with a vowel:

女儿 nǚ'ér daughter

This line is not this way imported. The pinyin ends up being only an 'e' in the pinyin field.

When putting in "nu:3'er2" manually, the pinyin is displayed in the flashcard and in the list as 'nǚér', this is without the apostrophe.

Is this how it is supposed to work?

How can we add the apostrophe?

#2 Should a pinyin syllable be able to end in an 'r'?

A pinyin ending with 'r5' or 'r' is displayed in the list and in the Flashcard review without the 'r'.

Chinese has this feature that after a normal syllable, a second character/syllable is added that is only an 'r' in pinyin. Examples are:

每准兒 每准儿 méizhǔnr (in case special symbols do not show well: mei2zhun3r) who knows; probably

头儿 tou2 r5 (head, leader)

哪儿/那儿 na3r5/na4r5 (where/there)

一会儿 yi1 hui4 r5 (a while)

一点儿 yi1 dian3 r5 (a little, some)

Both when entering the flashcard manually with CTRL-N or importing from a file. E.g.:


* enter in 'Simplified': 一点儿(=yidianer)

* ZDT Autofills the other fields correctly: pinyin is 'yi1 dian3 r5' in this case

* Click Finish

* The final 'r' of 'yi1 dian3 r5' does not show in the list (in the Flashcards panel)

* When doing for example a Self review, the 'r' is not displayed in the pinyin of the flashcard

How should this work?

#3 Sometimes I want to add extra character to the pinyin (and also to Simplified or Traditional). Should this be possible? If yes, what is allowed and what not? If no, can it be added (feature request)?

Examples is this:

一...就... 一...就... yi1 ... jiu4 .... as soon as <- because it is the structure that has a different meaning, the word list of most books show them with the dots to indicate this

...家 ...jia1 ...expert; specialist (e.g. computer-expert) <- normally jia1 has a different meaning, but if it is suffix, then it can mean this

还(2: verb)huan2 to return <- this character is usually pronounced as hai2, meaning 'also, still' etc. To add 'verb' helps the learner to note that this is different version of the same character

开 (+会)kai1 have a meeting <- usually kai1 means to open, but depending on the addition of other words, the meaning changes.

So to me, it would be helpful if dots, parenthesis, plusses or even numbers could be added (numbers I would use for when the same word, but with a completely different needs to be studied).

This question is the least urgent and might quite change the logic how ZDT process the input for new flashcards.

PS: is it an idea to update the version number, so when asking a question I am sure that I have the latest version?

PS2: is it a good idea to report issues at sourgeforge.net/project/zdt?

Share this post

Link to post
Share on other sites
Site Sponsors:
Pleco for iPhone / Android iPhone & Android Chinese dictionary: camera & hand- writing input, flashcards, audio.
Study Chinese in Kunming 1-1 classes, qualified teachers and unique teaching methods in the Spring City.
Learn Chinese Characters Learn 2289 Chinese Characters in 90 Days with a Unique Flash Card System.
Hacking Chinese Tips and strategies for how to learn Chinese more efficiently
Popup Chinese Translator Understand Chinese inside any Windows application, website or PDF.
Chinese Grammar Wiki All Chinese grammar, organised by level, all in one place.

kaya    42

#1) Yes, I think zdt should support apostrophe in pinyin, so I added this as special character. Check out the attached zdt.jar file, remove the .zip file extension before replacing your original zdt.jar by this one and tell me if it works for you. For me it seems to work (see attached screenshot).

#2) Yes, I think so. Doesn't it work for you? It's not a problem to have pinyin ending with r (see attached screenshot). Perhaps I did not understand you well?

#3) That's a tricky one. Not easy to solve.

Well, ZDT is able to recognize the following special chars (hoping that this forum is able to display them correctly as HTML):

()=+. ;?,!-&。;?,!-+='

However, it seems that ZDT first decompose and then recompose the whole pinyin text whereas ZDT may fail to put the special characters back at the right position. I didn't yet understand why the author coded it this way. The logic is a bit strange to me but perhaps I'll understand the intention of the author one day so I can fix it. But now I don't have (more) time for this bug.

PS1) Yes of course.

PS2) I'm not sure that I'll be informed about. Can you create one there please, so I'll know.



  • Like 1

Share this post

Link to post
Share on other sites
kaya    42

#2) Ok, I think I got it. Did you mean r when it is contracted, thus r is standing alone!?

If you want to be r a valid pinyin final, just add r to the pinyin table file located at [zdt]\plugins\net.sourceforge.zdt.core_0.9.0\etc\pinyin_table.txt

  • Like 1

Share this post

Link to post
Share on other sites
mvdberg112    7

@kaya - #2: Yes, it is about the 'r standing alone'. Is it that easy??? Thank you!

The solution doesn't work 100%. See the two screen shots:

  1. First shot: When the pinyin is tou2 r5 (as proposed by ZDT), the flashcard displays ‘tou’ with the right accent, but the 'r' with a '5' behind it. It should not display that '5'. Also input 'r' (no 5) still displays 'r5'.
    Second shot: When the pinyin is tour2, it displays simply 'tou' without an accent and then 'r' with a '2'.

Tried workaround: added 'tour' to the pinyin_table.txt file and changed the pinyin of the flashcard to 'tour2'. This worked. See third screenshot. This solution requires that we need to anticipate which pinyin-syllables could have a final r. Also, ZDT needs to autofill items like '头儿' with 'tour2' rather than 'tou2 r5'. (Third screenshot)

Is there another list that defines which accents a syllable can have?  

Suggestion: Can we include this change to the pinyin_table.txt in the final release?

PS: I'm not sure if the 'r' is really a 'standalone r', but I understand why it is said that way. The university here uses the book Hanyu Jiaocheng (used a lot all around), which writes things like 'tour2' or 'dianr3'. In the printed book there is no visual distinction between for example tou2r5 or tour2. I'm still surprised that ZDT's autofill proposes 'tou2 r5', but does not display that final 'r5' in the final flashcard!

#1post-50134-0-81168300-1366595083_thumb.jpg #2post-50134-0-15818500-1366595100_thumb.jpg #3post-50134-0-01466500-1366596005_thumb.jpg

This file has 'r' and 'tour' added.pinyin_table.txt

Share this post

Link to post
Share on other sites
mvdberg112    7

@kaya: "#1) Yes, I think zdt should support apostrophe in pinyin, so I added this as special character. Check out the attached zdt.jar file, remove the .zip file extension before replacing your original zdt.jar by this one and tell me if it works for you. For me it seems to work (see attached screenshot)."

The new zdt.jar works. It allows to use a ('), but not a (’). It displays it as a (’). Don't ask me why.

Is it a good idea to add support for inputting (’) or (‘) as well, because a user will not always realize the difference and perhaps not able to find out to use (') only. Also some the user might have inputted (’) in the past, and then it will still not display correctly, until the user goes back to correct every entry.

Anyway, I am very happy with this fix. Thank you!

Share this post

Link to post
Share on other sites
mvdberg112    7

@kaya: "...ZDT may fail to put the special characters back at the right position....."

That was exactly my experience. I could put them in, but then ZDT would for example place a leading '...' at the end.

I am already glad with the fixes we have so far. This is anyway more of a feaure request. If this is so difficult to fix, let's report it to the ZDT project, so you can see if you get the notification. Besides, could you point me to the code file, so I can look through it? Tx.

EDIT: created a tracker. Did you receive a notification? https://sourceforge.net/tracker/?func=detail&aid=3611523&group_id=133341&atid=726928

Share this post

Link to post
Share on other sites
kaya    42

Great to hear that the fix worked (at least partially). I don't know about the standalone r. Are you sure that this is correct in chinese? If it's correct, why it's not in the pinyin table at wikipedia? http://en.wikipedia.org/wiki/Pinyin_table

So perhaps you just need to correctly enter the syllable i.e. "er" instead of just "r"?

Also "tour" doesn't exist in the pinyin table!

Concerning the de- and recomposing, have a look at the method "splitPinyin" located in file net.sourceforge.zdt.core.util.ParserUtils.java

If you have any pointers, don't hesitate....

And yes, I got the notification of sourceforge's bug tracker. I'm just lacking the time to fix them all :)

Share this post

Link to post
Share on other sites
mvdberg112    7

Well, many schools use the book series Hanyu Jiaocheng (汉语教成) 第x册-上/下; 2006)

Book 3, page 118: is uses 'tour2' for 头儿。

Book 1, page 42: uses 'yi4dianr3' for 一点儿.

Not with numbers of course, but with accents. I know that 儿 is sometimes rendered as 'er' (e.g. 儿子=erzi=son), but when it just adds and 'r' sound to the end of a word, it is only rendered as an 'r'. Because the book uses accents, it is impossible to know whether to treat this as 'dian3r5' or as 'dianr3', as the result is the same.

There are more examples, but it would take up too much time.

Why are they not in the pinyin table? My guess is that it is because it is an exception. In our book, these also do not occur. They are seen as variation I guess, i.e. tour is a variation of 'tou' and 'yidianr' is a variation of 'yidian'.

Note that I call it a stand alone 'r' because when creating a new card with ZDT CTRL-N for the word '头儿', it proposes itself "tou2 r5" is the pinyin. Perhaps, simply

because it gets it from a dictionary. And then from the dictionary it perhaps decomposes it into "tou2" + "r5". That is why I called it standalone 'r', but this might not be a really good term.

Long story short: 'tour' and 'yidianr' are pinyin that do occur in Chinese study books, and are valid from these books' perspective. I do understand that it might be difficult to fix though...

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Blog Entries

    • roddy
      Signese Revival 9 By roddy in Signese 0
      One fairly random photo of Chinese characters in action, per week, until sometime in 2018. And perhaps longer if I'm encouraged. Those who want to contribute their own random photos of Chinese characters are welcome, just get in touch and I'll add you to the contributor list so you can post directly, from computer or phone.
      I wonder what a non-民用 key is. 

    • abcdefg
      Dim Sum Menu By abcdefg in Signese 0
      Here is the menu for the recent food article in which I reported on three mornings of Cantonese dim sum. This menu is from Yulong Seafood Hotpot Restaurant in Macau, near Ponte 16. The dim sum article is here: https://www.chinese-forums.com/forums/topic/54982-enjoying-dim-sum/?tab=comments#comment-424075
      (You can click the photos to enlarge them.)


      The waitress brings a pencil along with the menu, and you put a check mark below the items that you want to eat. She told me it didn't matter which box I checked, one of which is for ordering an item a la carte 单点 and the other for ordering an item as part of a larger meal 加单。
      She returns later with a typed receipt for the order as it was entered into their system. Always a good idea to double check at that point to be sure there was no mixup. Pricing category designations appear beside the name of the item: 特点,大点,中点,小点。

      I always try to pick up a blank extra menu so I can study it at my leisure later in the day and do a better job of ordering the next day.
    • js6426
      Week 3 By js6426 in Chinese Language And Literature Degree 4
      Sure thing!  So the book I was too lazy to grab is called 'Conversational Chinese 301'.  It's not bad, but unfortunately it has pinyin all the way through.  I find it so hard to concentrate on the characters when the pinyin is written underneath, but in theory you don't even need to pass HSK 3 to do this degree so I can understand it.  The degree itself is 'Chinese Language and Literature', and the only requirement was high school graduation, so very easy to get in for.  However, once you're in it seems like they won't have a problem kicking you out if you're not serious.  My teacher was not amused today when a guy strolled in an hour late, and another of my teachers said our class will probably go from the 28 we are out now down to around 20 students or so in the next couple of weeks as they deal with people not coming to class etc!

      Tomorrow we will finish the final chapter (8) of the first book of the 'Threshold' level of the Road To Success series, which contains 4 books.  On Wednesday we are meant to have a test on all the characters we have covered in the book (there aren't actually any in there, but we either had to find them or were given them so we could learn them).  By the end of the 4th book in this series we should have studied 1200 words (according to the back of the book).  The next stage then has 2 books, which gets us up to 3000 words, then the final stage has another 2 books, leaving us at 6000 words.  I actually really like this book, in fact I really like all the books we are using, I have found them especially helpful for stroke order.  I am far from perfect, but I find myself actively thinking about stroke order and getting it right much more of the time now.  Also, even though they are beginner books, I find I am having to learn characters that I would never have taken an interest in learning to write otherwise (things like fruit and vegetables).  This is great because it means I'm not getting bored just hearing stuff I have already learned repeated. 

      Last Friday I gave a brief description of a family photo.  It was an on the spot thing rather than prepared, so it wasn't until afterwards that I realized how bad it had been!  I pretty much just went through and said who everyone was, pointing at people or using the colour of their clothes to describe them.  I should have been using words like 旁边,前面,后面 etc. but I didn't.  Anyway never mind, it was good fun and reminded me to slow down and think a little bit more before I speak. 
      The quality of the teaching at this point is fantastic.  It's almost 100% Chinese which is great (although obviously spoken at more of a basic level so we can understand).  Our 'comprehensive' teacher relies very little on the book, and breaks off into his own little world all the time, which I actually really like as we end up getting all sorts of new words and culture points out of it.  He also teaches us things that we probably wouldn't learn for a while otherwise, like 公主病, 王子病,or how Q is commonly used in place of 可爱 on social media, or 3Q for 'thank you'!

      It's hard to know what to put in an update, but as I said, I would love to look back on this in 4 years and remember the start of this journey, so most of this is for me rather than anyone else!  But if anyone has any questions or anything, then please feel free to ask!
  • Recent Posts