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. 
艾墨本

Auto-add example sentences to Anki decks

Recommended Posts

艾墨本

Does anyone know of any add-ons that add example sentences to Anki decks?

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.

Yadang

From what kind of source? If you're reading an article on the internet? An electronic book? An example sentence from a dictionary definition (in pleco)?

Share this post


Link to post
Share on other sites
艾墨本

Ideally, it would be an automated process. So say I import a list of words that I've compiled while living life in China. I put those words into anki. I run the add-on that adds pinyin and definitions. Now I run an add-on that will add an example sentence. Currently, I manually go through Pleco or zhonga to add example sentences manually. 

 

It would save me a lot of time if an add-on automatically went through... zhonga? for example sentences and added them to Anki my anki cards. Maybe allow me to specify a minimum length for each sentence, or just automate the grabbing sentences part and then give me a popup for each word and I can select which sentence I want. Either would significantly speed up notecard creation.

Share this post


Link to post
Share on other sites
imron

Do you have a compilation of texts and/or news stories that you've collected anywhere?

 

With the next release of CTA you'll be able to write a script that will automatically go through a bunch of documents and extract sentences containing unknown words (or even better sentences where you know over a certain percentage of words) and save that along with pinyin and definitions to a tab separated file which can then be imported by Anki.

 

It won't be 100% automated, but the steps will be something like:

 

Open CTA,

Run script

Import to Anki

  • Like 2

Share this post


Link to post
Share on other sites
Flickserve

If I hadn't read Imron's post, my question would have been, if a plugin adds a sentence, how would it select what is the most apt sentence to plugin

Share this post


Link to post
Share on other sites
艾墨本

@imron, that's awesome! Can't wait. I definitely don't have the tech-know-how to be able to write a script. Creating Anki templates already takes me a lot of work.

 

@Flickserve, that's where my secondary thought came in "Maybe allow me to specify a minimum length for each sentence, or just automate the grabbing sentences part and then give me a popup for each word and I can select which sentence I want." I was also thinking about that aspect. But if a script, say, went to jukoo and grabbed three sentences that have a ratio of 10:1 good/bad ratings with length >5 characters and <20 characters, then show those sentences for me, I could then just quick grab them. Then just automatically do the same for the next word. 

 

Sounds like I'm fantasizing too much and should just continue taking the time to pick out suitable sentences. 

Share this post


Link to post
Share on other sites
imron
I definitely don't have the tech-know-how to be able to write a script.

My plan is to have a dedicated thread where people can ask for help with writing scripts and or discuss ways to implement certain things with scripts.

 

Downloading sentences from a website would be a bit more involved (but not impossible), but if you had a document or documents containing sentences (or articles) you could generate sentences within your parameters with only a handful of lines of code.

  • Like 2

Share this post


Link to post
Share on other sites
mikelove

If you're talking about doing this with newly created cards rather than existing ones, the experimental AnkiDroid integration in our latest Pleco beta might help - includes an option to export example sentences in the definition (and nicely formatted, unlike in text file exports). Also has support for one-button creation of clozes from individual example sentences.

 

Adding the ability to populate existing cards with Pleco data is on our to-do list too - we've designed our integration with that in mind (interoperating with your existing Anki decks / models).

Share this post


Link to post
Share on other sites
艾墨本

Woah, @mikelove, that's awesome. Is there a way to add sentences to notecards, currently? Any timeline on when this will leave beta?

 

@imron, that's great to know. Then, maybe it's just a matter of downloading one of those massive "spoonfed Chinese" anki desks and exporting that to a text file. Could the code extract relevant sentences, then?

 

P.s. I love these forums. Where else can I talk to people from Pleco, the creator of CTA, and other Chinese enthusiasts all at the same time?

Share this post


Link to post
Share on other sites
mikelove

Not to existing cards yet, but we're thinking about adding an 'update text' button in the next beta that would let you replace the definition of an existing AnkiDroid card with one from Pleco (which would include examples).

 

Appending examples to existing fields in existing cards is somewhat dicier because we have to figure out what's going on in the card HTML-wise and where we can inject our example sentence without screwing up the format of the rest of the definition - replacing an entire field is a lot easier than adding a bit of content to it.

 

EDIT: forgot to answer your other question; app update should be out of beta in a week or two, though AnkiDroid integration specifically will probably keep its 'experimental' tag for a while longer.

Share this post


Link to post
Share on other sites
imron
Could the code extract relevant sentences, then?

Yep.  Just export the fields you are interested in.  The Lua scripting feature will have built in support for reading tab separated files, so you'll be able to load and manipulate their contents as needed.

Share this post


Link to post
Share on other sites
Yadang

Well, Imron got to it before me, but I was also going to suggest CTA.

 

 

Then, maybe it's just a matter of downloading one of those massive "spoonfed Chinese" anki desks and exporting that to a text file. Could the code extract relevant sentences, then?

 

If you want sentences from native media (movies) with audio, I've been creating a thread with anki decks that were made from movies using Subs2SRS (which splices apart a movie into sentences based on subtitle timings). You could download all the decks and export the sentences into CTA easily.

 

Imron's Lua scripting will then allow you to tag all of the sentences containing words you don't know, as well as add definitions and pinyin. The output from CTA can then be imported back into anki and you'll have full audio for sentences containing words you don't know, along with pinyin and definitions for those words.

 

If you don't want to wait, you can use my excel file I built for this purpose, described in this thread

 

Of course, once Imron's Lua feature comes out, it will be more user friendly and maybe allow the user to add sentences from a "custom database" of sorts, as described here.

Share this post


Link to post
Share on other sites
艾墨本

The idea of easing your collection of properly-parsed sentences from movies/tv shows would be great! What I was hoping to do is that as I prepare to take the HSK 5, I'm filling in some vocabulary holes and want to add sentences to help me remember the word's meaning. If the sentence includes a useful grammar, that's a plus!

 

I used CTA to mark all the words I know in the HSK 5 list and then exported the unknown. I hope that this Lua feature will allow me to then greatly speed up the process of adding sentences to all those words. If I had my custom database built from your Subs2SRS collection, I could potentially have a really useful HSK deck.

Share this post


Link to post
Share on other sites
Flickserve

What you do is have all the sentences in the anki and then from your HSK 5 list, search for that particular word in the whole database and put the sentence with that word in a new deck for you to test yourself on. You can then cloze that particular word.

I did notice some deficiencies in creating the movie decks and found popular films have more simple language constructions and some limitations in the range of vocabulary. But, the decks were relatively straightforward to create thereby creating lots of sentences.

To get HSK type vocabulary, the spoon fed Chinese deck might be worth a try.

It looks like you are taking a word in isolation and trying to add sentences to that note to help you remember. That works as well but perhaps you are creating more work for yourself.

  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register 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
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...