By default when you fail a review, Anki increments a lapse count on the card. However this number will only keep increasing, so even after years you might end up with something like 30 lapses and a leech tag, even if that card is not an issue for you anymore. This add-on reduces the lapse count of a card after you demonstrate consistent success with it, and takes the leech tag off a note once every card on it has recovered far enough. The main purpose of all this is that your list of leeches is now actually relevant, instead of it being composed of all the accumulated lapses since the dawn of time.
The work happens when you sync rather than while you review. Every review card with at least one lapse is checked against its review history, so answers from another device (e.g. AnkiDroid) count exactly the same as answers given here. The add-on then syncs its own changes back to AnkiWeb by itself, so a single press of the sync button is all it takes.
This add-on was originally based on an existing one called Leech Balancer, although that one assumes you do all your reviews on one device, where the add-on is installed. It wouldn't credit the reviews you sync from other devices. At this point my add-on can hardly be called just a modification though, because almost all of the code doing the work has been rewritten, due to how much added complexity the AnkiWeb sync introduces.
How It Works
For each review card, the add-on counts how many times in a row you most recently answered it with Hard, Good or Easy. Once that streak reaches the configured threshold, the card's lapse count drops by one. Answering Again breaks the streak and it starts over from zero.
A streak earns one reduction for each new length it reaches, and never the same length twice. The add-on records what it has already credited in a tag on the note, such as lapse-sync-done-c0-3 β c0 identifies the card within the note and 3 the streak that was credited. A card carries only one of these markers at a time: extending the streak replaces it and earns another reduction, and breaking the streak removes it. These tags are housekeeping and can be ignored, though they are handy for finding the cards the add-on has touched.
Settings
You can customize the add-on's behavior through its configuration:
Required Correct Answers
- Purpose: Sets the number of consecutive correct answers needed to reduce a card's lapse count.
- Default Value:
4
- Minimum Value:
1
Remove Leech Tag Below Lapses
- Purpose: Sets the lapse count under which the
leech tag is taken off. With the default of 5, a card must be back down to 4 lapses or fewer. Set it to 0 to keep the tag on everything that has earned it.
- Default Value:
5
Show Toast
- Purpose: Enables or disables the toast notification shown after a sync in which lapses were reduced.
- Default Value:
true
How to Configure
- Open Anki.
- Go to
Tools > Sync Leech Balancer Config.
- Adjust the settings and save.
The code is also available on GitHub.