A few Flashcards questions

Feilian

秀才
Hello everybody,

I have been using Anki flashcards for some time now, but I would like to use Pleco instead from now on. Indeed the ability to search a character or a word from within a flashcard is a major advantage.
But in the process of importing my cards I came up with a few problems.

First of all, I have understood from the Pleco manual that Pleco can fill the pinyin for you if you do not provide this information in the txt file to import. But despite my numerous tries I cannot do it. Does somebody knows something about this issue ?
[in fact I have no pinyin in my file because the exported file from anki, export the pinyin with diacritical signs and the colors associated with it : basically a lot of brackets and numbers. Correcting that to Pleco friendly pinyin for hundreds of cards could take weeks]

Secondly I would like Pleco to color the characters in the entries of my flashcards according to their tones, juste like it does in its dictionnaries. It that possible ?

Last but not least (this seems indeed quite important to me), is there a way to add examples in the flashcards and to "mark" them so that they appear only when you show the answer of the flashcard. I have already noted that when a card comes from a dictionary the examples does not show (and I regret it because examples are so important to know in which context a word can be used) but if  I convert the card to a customised one the examples always shows which is not optimal because it gives you hints on the answers. 

Thanks in advance for your answers, this would make it really easier (actually doable...)

Christian
 

mikelove

皇帝
Staff member
Feilian said:
First of all, I have understood from the Pleco manual that Pleco can fill the pinyin for you if you do not provide this information in the txt file to import. But despite my numerous tries I cannot do it. Does somebody knows something about this issue ?
[in fact I have no pinyin in my file because the exported file from anki, export the pinyin with diacritical signs and the colors associated with it : basically a lot of brackets and numbers. Correcting that to Pleco friendly pinyin for hundreds of cards could take weeks]

It only works if you don't supply definitions; this is basically because if you supply a definition, in the case of characters with multiple possible pronunciations there's no way for us to tell which one of them matches that definition and you could end up with a flashcard where the Pinyin is incorrect. Whereas if you supply only characters and no Pinyin or definition, then we know that we have the right Pinyin for the definition that we generate.

Could you paste in some examples of the Pinyin from your exported file? It may be that that we can recommend a particular search-and-replace command you can perform in a text editor to automatically clean it up for Pleco in a single operation.

Feilian said:
Secondly I would like Pleco to color the characters in the entries of my flashcards according to their tones, juste like it does in its dictionnaries. It that possible ?

Yes - it'll happen automatically if the cards have valid Pinyin.

Feilian said:
Last but not least (this seems indeed quite important to me), is there a way to add examples in the flashcards and to "mark" them so that they appear only when you show the answer of the flashcard. I have already noted that when a card comes from a dictionary the examples does not show (and I regret it because examples are so important to know in which context a word can be used) but if  I convert the card to a customised one the examples always shows which is not optimal because it gives you hints on the answers. 

You can get the examples to show in dictionary-linked entries by going into Flashcard Testing / More Settings / Display / Card Text and changing "Definition sections" to "No Xrefs" or "Show All."

As far as hiding them in custom cards, there's not currently any way to do that, but we do have an experimental feature that will automatically strip the headword characters + Pinyin out of the text in the definition / examples; enable that in the Settings tab / Flashcards / Test Interface / Filter head in defns.
 

Feilian

秀才
Thanks for the answers !
The hiding feature is nice, I'll use it to hide the headwords in the examples. But I definitely think that an option to hide option when asking and show them in the answer would be very very cool (for a future future version maybe if some other people find the idea interesting ?)
As far as the pinyin is concerned, here is an example :
<span style="color:#0000ff;">zhǔ</span><span style="color:#545454;">zhe</span><span style="color:#0000ff;"> </span> <span style="color:#0000ff;">guǎi</span><span style="color:#ff00ff;">gùn</span><br /><br />
This is the pinyin for  拄着拐棍... pretty horrible, isn't it ?

I you have any advice, I would be very grateful,

Thanks for all,

Christian
 

mikelove

皇帝
Staff member
Feilian said:
The hiding feature is nice, I'll use it to hide the headwords in the examples. But I definitely think that an option to hide option when asking and show them in the answer would be very very cool (for a future future version maybe if some other people find the idea interesting ?)

Certainly might be possible - we need to add formatting tag support (bold / italic / etc) anyway and this would be a reasonable extension of that.

Feilian said:
As far as the pinyin is concerned, here is an example :
<span style="color:#0000ff;">zhǔ</span><span style="color:#545454;">zhe</span><span style="color:#0000ff;"> </span> <span style="color:#0000ff;">guǎi</span><span style="color:#ff00ff;">gùn</span><br /><br />
This is the pinyin for  拄着拐棍... pretty horrible, isn't it ?

Fortunately, this should be pretty easy to fix in a text editor. If you're on a Mac, download the free TextWrangler, or if you're on Windows download the free demo version of EmEditor (or any other text editor that supports "Regular Expression" or "Grep" search-and-replace). Open up your exported file, open up the find-and-replace screen, check whatever box turns on the regular expression / grep search mode (and if there's a menu to select the style of regular expression, choose "Unix" or "Perl"), then enter:

Code:
<[^>]*>

in the "Find" box and blank space in the "Replace" box. Then, just "Replace All" and that should instantly take away all of those annoying tags. The use of tone marks instead of tone numbers shouldn't matter, Pleco will quite happily convert between them once you've gotten rid of that <> business.

You could also do this even without regular expressions since there are so few colors to choose from - just find-and-replace the <span style="color:#0000ff;"> for each color with a blank space, and do the same with a </span>; that'll work with the basic find-and-replace command in Word or NotePad or WordPad or TextEdit or pretty much any other text editor.
 
Top