Anki Text Playback

This is a rough template hack for Anki that I created which will only display an Expression when a trigger is clicked; it will display the expression for a length of time, in milliseconds, designated by a Length field on your card. It requires a Length field with time in milliseconds. Or Sequence Marker field (see below for formatting). I emphasize that because Anki will crash if you try to run it as is without it. See the final point in this entry for a more complete safeguard. Update: Primer.

After which the expression will disappear and you’ll have to click ‘Play Text’ again to get it to reappear. Feel free to replace <p> with <div> etc., onClick with onMouseOver, or style and/or replace ‘Play Text’ with your preference; perhaps even a play button of some sort from Google Images.

I created this for a few reasons.

First, for deaf learners, or hearing persons for various reasons, it can simulate for text the time limitations of video or audio clips from shows that would be generated by subs2srs but are absent or inaccessible.

That is, without video or audio clips, studying lines in Anki won’t clue you in on precisely how long subtitles would be displayed on a screen when watching the actual video, making the comprehension cards less transfer-appropriate; previously I recommended referencing the sequence marker information and constantly keeping the time in mind when reviewing statically displayed text, but that’s not an ideal solution.

You could also use this for regular video clip comprehension cards, to further simulate the video viewing experience, with transient, selectable text rather than having to hardcode the Japanese subtitles. Perhaps replace onClick with onMouseOver to streamline the playback and if using the replay button add-on you could place the Video/Audio field directly adjacent to the link to make the playback onsets synch up further.

With this code, which you ought to stick on the Front of subs2srs comprehension cards, use the Sequence Marker field instead of Length, in subs2srs’s preferences setting sequence marker format to ${d_total_msec} (thanks cb4960!). Perhaps rename the field back to Length if you have a lot of subs2srs cards in the same deck with a different sequence marker format, as those would cause a crash onClick.

Second, you can use it for fluency activities. That is, taking well-learned language items and studying them under time pressure. In the past I suggested auto-answer add-ons, which subsequently have flourished and are useful in their own right, but these are not ideal for fluency activites, as with such add-ons you only get one shot and there’s the added emphasis on grading.

With this code, you can turn Anki cards into fluency exercises in a few ways. For example, you could have multiple instances of the code on the front, each with a different duration, getting shorter and shorter for an exercise similar to Paul Nation’s 4-3-2 speaking activity.

Again, grading isn’t necessarily the aim here, so perhaps filtered decks for mature cards (prop:ivl>=21) that don’t affect scheduling would be useful here.

Or you could put the code on the back of a regular card, so you can practice your fluency after getting feedback. In which case you’d likely want to remove the FrontSide code, if any, thus displaying only the playback elements without recourse to statically displayed answers.

You can also treat it as a perishable hint field, of course.

  • Speaking of feedback, you can use this code for delayed corrective feedback in Anki. Stick it on the back of the card. By default it’s set to wait 3 seconds before showing you the answer, as I seem to recall that being the time used in research which showed the benefits of delaying corrective feedback. Of course, the downside is that it adds 3 seconds to each card review, so perhaps reserve it for certain types of cards…
  • You might want to wrap the text playback code in {{#Length}}code{{^Length}}{{Expression}}{{/Length}} – Or Sequence Marker field (see above). This tells Anki to only display the text playback field if the Length field isn’t empty; if it’s empty it will just display the Expression field. This should eliminate the risk of Anki crashing.

Here’s a sample template if you’re doing ja・ミニマル’s video clip comprehension cards. Make sure to keep cards made with that Sequence Marker format separate from other subs2srs cards. Or perhaps after creating these, you could rename the field to Length and use that instead.

looper v→l/o: regenesis

A more advanced technique than before to automate looping is to use selective card generation. It requires this main.py for Morph Man, and these 3 fields in your deck: mx0 (is set to Yes if a card was ever entirely mature; never emptied), k1e (is set to Yes if a card was ever k+1; never emptied), and outlier (set to Yes if cards are m+1 or higher, or k+2 or higher; emptied at m+0 and k+1). I added the config.py above also so you can see the field setup.

For the r→p loop, where you switch to studying vocabulary as production after it becomes mature through studying it as recognition, you use this front layout for the production template:

{{#mx0}}{{Meaning}}{{/mx0}}

See the original Looper for full layouts. Production cards will only be generated if a vocabulary word is studied to maturity via recognition cards. After this, failing production cards won’t result in the card disappearing, as the mx0 field remains, so you can restudy it as production, the way it was intended.

For the v→l/o loop, going from vocabulary to listening comprehension or output cards, set up 3 templates: vocab, comprehension/output, and outliers.

For the front of the vocab template:

{{#focusMorph}}{{focusMorph}}{{Audio}}{{/focusMorph}}

For the comprehension or output template front:

{{#mx0}}{{Sentence Meaning}} and {{Shuffled Gloss}} if output, or {{Video}} or {{Sentence Audio}} if comprehension{{/mx0}}

For the outliers front template:

{{#outlier}}{{unknowns}}{{^unknowns}}{{unmatures}}{{/unknowns}}{{/outlier}}

With this set up, if a card has multiple unknowns it will remain in the outliers template, so it can grow into a k+1 card. Without this template such notes would be destroyed when using ToolsEmpty. Also, in some cases, cards may be entirely known yet not entirely mature when MM3 analyzed them (thus no focusMorph, which lasts until cards are m+0, but which is only set if a card has 1 unknown when analyzed); with this template these will also remain.

So primarily you will study the vocab and output/comprehension cards, but you can also study the outliers should you wish, or they will grow on their own as your knowledge grows.

Use the filtered decks at the end of the previous looper tutorial to study cards as vocab or listening comprehension/o+1. The k1e field and filter ensure that you can study cards as vocabulary always, despite lapses which may affect k+N, just as mx0 ensures output/comprehension.

Once you have this set up as above, and MM3 has processed cards, you can run Tools→Empty and cull the excess cards from your decks, leaving you with a lean system. They’ll regenerate as needed, as you learn. In fact the system’s so lean there’s some redundancy with the filtered decks, but I like to have a kind of separation of concerns.

If you want to review the vocab and listening comprehension/output mixed together, you can use the filter -outlier:yes (or perhaps outlier: which should designate only empty fields, the way typing nothing after the colon does in the browser search).

ja・ミニマル resources shared at AnkiWeb

Now that I’ve upgraded to Anki 2.0, in preparation for overhauling this site with updated, streamlined tutorials, all in the name of the new minimalist program ja-minimal, I have uploaded some resources to AnkiWeb:

Decks:

Add-ons: