Ok, I kinda lied. It’s not that easy, but it’s the only way I’ve got! If you follow the instructions, you should be cloze-deleting/spaced repetition-ing your way to fluency in another language in no time!
I have been using LWT more and more lately, and I really like it and find it an extremely useful (maybe even go so far as to say powerful) tool for language learning. I wanted to export my vocabulary terms (Words & Expressions) to Anki SRS, so I could review while on my way to work, but I couldn’t find any guides online and using the “export all terms (Anki)” button makes a text file that isn’t compatible with Anki unless you tweak your Anki deck first. After reading the documentation on both LWT and Anki, I learned how to properly export the terms to Anki, and have them show up correctly as cloze tests. Below you’ll find the screen shots detailing the (not so easy) step by step process.
First head over to your My Terms (Words & Expressions) page and filter to only the terms you want to export using the Language/Status filter drop-down on the top left . I chose to filter by language (Cantonese) and then further refined the results to only include terms I’m currently learning.
Next, under the Multi Actions section, on the ALL Terms (this will save the step of highlighting all the terms) choose “Export ALL Terms (Anki).” This will present you with an option to save the document (lwt_anki_export.txt). Note: According to the developer, “Export ALL Terms (Anki)/Export Marked Terms (Anki)” exports all terms that have been marked AND have a valid sentence with {term} for Anki.
First thing you need to know is how LWT handles your expressions/terms in the text file BEFORE importing it to Anki. The LWT export is tab-delimited in this order:
- Term
- Translation
- Romanization
- Sentence without term (cloze test question)
- Sentence with term (cloze test answer)
- Language
- ID Number
- Tag.
We will use this information a bit later to create fields for the card layout in Anki.
Open Anki and go to File–>Import. It will ask you to make a name for the deck to be imported. I chose LWT – Cantonese. You will be presented with an Import window and a list of Fields to be mapped. Right now, we will only have Front, Back, and Tags, which aren’t very useful nor near enough fields to do a proper import, so click on the wrench.
In the Deck Properties window, click the Edit button.
In the Model Properties window that pops up you’ll be given a chance to name the model something more meaningful than “Basic” (like Learning With Texts for example). Once you’re done renaming the model click on the Card Layout button near the bottom.
In the Card Layout window that pops up navigate to the Fields tab.
On the Fields tab create 8 fields corresponding to the fields of the tab-delimited text file as mentioned above. So the first field should be called term, the second field: translation, the third: romanization, and so on.
Back on the Card Templates tab, we need to format the Question and Answer boxes (See the comments below the post for alternative card types such as recognition or words only). You can format them however you like, but for a cloze test you can copy and paste the following in the Question box:
<p>{{Sentence without term (cloze test question)}}
<br/>{{Translation}}
<br/>{{{Language}}} / {{{ID Number}}}</p>
and in the Answer box:
<p>{{Sentence with term (cloze test answer)}}
<br/>{{Translation}}
<br/>{{Romanization}}
<br/>{{{Language}}} / {{{ID}}}</p>
It should look something like this:
There will be nothing in the preview except two forward slashes. Don’t worry, that’s because we haven’t imported anything to the deck yet. Better than seeing an error! Close the Card Layout window and then the Model Properties window, and then the Deck Properties window.
Ensure that the Model we just created (Learning With Texts) is selected and that the terms 1 through 8 correspond to the order mentioned above, then hit Import. (Finally! :))
Now for the fun stuff. If all goes well, you’ll see a confirmation box and after closing it, hit the review button.
You should get something like this:
And after you hit Show Answer, you should see something similar to this:
Please let me know if you can’t get it working or if you have suggestions or ideas for making this tutorial better. T’is the first one I’ve written. Don’t know if it’s not concise enough. I’d be happy to review it. :)











Thank you for your great posting.
I would like to add that there is an Anki demo deck within the distributed ZIP of LWT (sub folder “anki”) that is already prepared to import LWT’s export files for Anki.
Yeah, the demo deck is where I got the example code for the question and answer. How else could I do this?
Hey, thanks for an awesome guide to doing this. I definitely need to give LWT a shot, and quit being daunted by its setup process. I guess, before, I just hadn’t figured out how it would fit in as a tool in my arsenal, but I think after reading this post and watching the great video FluentCzech made: http://www.youtube.com/watch?v=QSLPOATWAU4 , I can see how this would actually easily not just fill a niche for me, but rather automate and bring together a number of processes I am already using.
Cool, I’m glad it helped! It has a bit of a learning curve, but once you figure it out, very easy. Great tool to pair with Anki. I find it motivates me to keep adding more and more dialogues and add new terms! I’m a bit of a statistics junkie ;)
LWT is really cool, but for people who are looking for a simple way to create cloze deletion flashcards, I recommend using http://www.learnclick.com
Hey thanks for the recommendation! The only problem with that is you get 5 texts then you’ve got to upgrade. LWT is free. Unlimited texts and I keep all data on my computer. I can add media and listen to it in the browser. But for doing a few cloze tests it looks good.
The text limit has now been removed and using learnclick.com as a learner is now for free.
Thanks for the excellent explanation! It’s working wonderfully for me! I’ll link to this in my blog post introducing LWT and its online version via my site.
Just glad it helped!
I did get LWT installed and have been using it some since I last replied to you. It is definitely very powerful software. Kind of silly that I put off using it for so long, actually. Thanks again for the tutorial, it was very easy to follow.
Thanks a lot for this great guide. I tried to do this on my own but had no idea how to. Your guide worked perfectly.
Thanks for publishing this info – it’s really helping me a lot right now to start getting my LWT items into Anki. Great work!
hi, how can i import words without sentences?
All the data will be exported automatically, but if you want you can only display the words (Terms) in the cards as opposed to the entire sentence. You would just alter the card template to look like this:
<p>{{Translation)}}</p>
and in the Answer box
<p>{{Translation}}
</br>{{Term}}
In the the guide’s example the question card would show as “number of people” and the answer would show as “number of people” with “人數” beneath it.
I hope this helps.
That worked amazingly well!! Thank you so much for this guide!!!
You’re very welcome.
Hi, first of all thanks for the explanations, they really helped me to create the recall test. The question I whant to ask you is if you know how to create recognition test form LWT?
You are the man! Thanks so much.
Also, if I import the list a second time after I’ve added new words, will it automatically remove duplicates? Thanks.
It won’t remove duplicates, so to get around that, I do the following: New words that I add to learning with text are kept at a status of 1. Once I’ve exported them, I update their status to 2. This way I never run into duplicates in Anki. Hope that works for you in your setup. Thanks for the comments! Glad you found the post useful.
Alex, you just change the card template in Anki to look like this:
{{Term}}
and in the Answer box:
{{Romanization}}
{{Translation}}
Were the example set up like this, the front of the card would be: “人數,” and the back would be ” yan4 sou3, number of people.” Thanks for your comment!
Benny Lewis wrote a message on your site. He did a TedX talk. That’s pretty cool!
Yeah, I saw that talk too! The article he wrote and tried to link here is at http://www.fluentin3months.com/learning-with-texts/
Thanks!
Does your LWT site ever not work for days at a time? Every week or so I get this message and it lasts a few days:
Invalid query: select max(SeID)+1 as value from sentences
I’ve never experienced that, no. You could try searching the forums over at LWT’s sourceforge page: http://sourceforge.net/projects/lwt/forums/forum/1813497
[...] it offers a way to export to Anki. It’s not simplistic by any means, but there’s some fine instructions at Living in the Middle Kingdom on how to get your terms, definitions, and sentences into Anki. [...]