Jump to content
Chinese-forums.com
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. 
mvdberg112

ZDT 0.9.0x - three Pinyin Questions

Recommended Posts

mvdberg112

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.:

* CTRL-N

* 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

#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.

post-46889-0-51317500-1366580180_thumb.gif

zdt.jar.zip

  • Like 1

Share this post


Link to post
Share on other sites
kaya

#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

@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

@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

@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

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

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


×