Monday, January 21, 2013

Using Learning with Texts with Anki 2, part 5: How to import LWT terms into Anki using your own custom set-up

So we've now covered how to export from LWT and how to import into Anki as simple two-sided flashcards and using LWT's fill-in-the-blank review template.

And that's all fine and good if one of those methods is how you want to learn your LWT terms. If that's not the case, then we'll need to get into the weeds a bit more and create a customized set-up.

To do this, I'll use my particular set-up for Japanese as an example. Simple two-sided flashcards won't work with Japanese since you also need to include pronunciation information (i.e., the readings of Chinese characters). In addition, I want to know a term cold even when I see it completely out of context, just as I do for English terms, which means that LWT's fill-in-the-blank template, which shows you the context of the source sentence right at the outset, is not for me either. That said, I do want to have the source sentence shown to me after I see the answer; if I had any trouble recalling the term, I can review the source sentence to get an example of its use.

So, for the "front to back" review, I use the Japanese term alone as the prompt and the meaning, reading, and source sentence as the response. For the "back to front" review, I use the meaning alone as the prompt and the Japanese term, reading and source sentence as the response. I score the card based only on how I do on the term, meaning and reading.

Set-up

To use the easiest possible way to set up a custom deck in Anki for use with LWT terms, we'll use LWT's template as a basis and add our customizations to that.
  1. If you haven't done so already, follow the set-up steps for importing LWT terms into Anki using LWT's fill-in-the-blank Anki template.

  2. Open Anki and, in the "Anki" window, click "Add".

  3. In the "Add" window, click the "Type" button.

  4. In the "Add" window's slide-down window, click the "Manage" button.

  5. In the "Note Types" window, click the "Add" button.

  6. In the "Add Note Type" window, select "Clone: LWT" and click OK. This will make the copy of the LWT template that we'll modify with our customizations.

  7. In the "Add Note Type" window's slide-down window, name your custom note type (I'm naming mine "Japanese"), click OK, and close the "Note Types" window.

  8. In the "Add" window's slide-down window, select your custom note type and click the "Choose" button.

  9. In the "Add" window, add some sample text to each of the fields you intend to use (it doesn't matter what text you add), click the "Add" button, and close the "Add" window. This will create a single note that uses your custom note type, which you will need to have for subsequent steps.

  10. In the "Anki" window, click "Browse".

  11. In the "Browser" window, select "Japanese" in the left-hand column and click the "Cards…" button.

  12. In the "Card Types for" window's "Front Template" field, select all, and press delete. This will clear out the front card from LWT's template.

  13. Click the "Add Field" button.

  14. In the "Add Field" window, select the field you want to add from the "Field" pull-down menu, adjust the font and size as you see fit, and click OK. What you add here will be the "front" side of the flashcard, i.e., it will be the prompt to which you'll need to provide a response.

  15. Repeat the previous two steps until all the fields you want have been added to the front. (As I only want a single field on the front, I'm already done.)

  16. In the "Card Types for" window's "Back Template" field, select all, and press delete. This will clear out the back card from LWT's template.

  17. Click the "Add Field" button.

  18. In the "Add Field" window, select the field you want to add from the "Field" pull-down menu, adjust the font and size as you see fit, select "Back" among the "Add to" radio buttons, and click OK. What you add here will be the "back" side of the flashcard, i.e., the response that you'll need to provide after seeing the front side.

  19. Repeat the previous two steps until all the fields you want have been added to the back. Be sure to include whatever fields you want from the front side as well, as the front side will no longer be visible once the back side is displayed. As you can see in the image below, I simply reproduced the front side on the back.

  20. If you look carefully at the mess of HTML text in the front and back templates, you'll notice that the name of the field is in double curly brackets (e.g., "{{Word}}"), which is then followed by "</div>". If you want to include a line break after one of the fields in either the front or the back, after the "</div>" following the field you want the line break to follow, add "<br />". You can check that this is working as you want it to in the preview panes on the right.

  21. You've now got your "front to back" card (for me, Japanese to English). If that's all you need, you're done. If you also want a "back to front" card as well (e.g., English to Japanese), in the "Card Types for" window, click the "+" button in the top right. This will create a second tab called "Card 2".

  22. In the "Card Types for" window's "Card 2" tab, go through steps 12 to 20 again to set up this card as you like it. I've set mine up to show only the meaning of the term, while I've got to produce the term and its reading.

  23. Close the "Card Types for" window and the "Browser" window.

Importing

Once the above set-up has been done, you'll only have to do the following each time you want to import LWT terms using your custom note type:
  1. Open Anki and, in the "Anki" window, click "Import File".

  2. Select the file you exported from LWT ("lwt_anki_export.txt" if you did not change the name) and click the "Open" button.

  3. In the "Import" window, click the "Type" button, select your custom note type, and click the "Choose" button.

  4. In the "Import" window, check "Allow HTML in fields".

  5. In the "Import" window, click the "Import" button. This will open a second "Anki" window that tells you how many notes were added.

  6. Close the second "Anki" window.

You're now ready to study your imported LWT terms using your custom note type.

Versions used for this how-to:
  • Chrome 23.0
  • Opera 12.12
  • Learning with Texts 1.4.9
  • Anki 2.0.3
  • Mac OS X 10.8.2
This post is part of a five-part series on using Learning with Texts (as implemented on Fluent in 3 Months) with Anki 2.
  1. What you need to know before you get started
  2. How to export LWT terms for Anki
  3. How to import LWT terms into Anki as simple flashcards
  4. How to import LWT terms into Anki using LWT's fill-in-the-blank Anki template
  5. How to import LWT terms into Anki using your own custom set-up
And if you're still using Anki 1, learn how to export LWT terms to Anki 1 here.

3 comments:

  1. Writing a manual can't even shine a light on making the machine… thank you!

    ReplyDelete
  2. First, thank you so much for your hard work! I have a quick question though. I want to make flash cards where the term you are learning is simply in bold rather than cloze deleted. Do you know of a way to do that in LWT? If not, is there an HTML work around I could do to my deck in ANKI? Thanks again!

    ReplyDelete