Anki add-on: Forgiving Leech

The Forgiving Leech add-on aims to make the leech mechanism more forgiving by adjusting the way leeches are identified. It allows you to be more lenient with old cards that might otherwise be suspended due to lapses. If you're a fan of the leech mechanism but find it to be too strict for older cards, this add-on is for you. Motivation Let's say your leech threshold is set to 4 lapses. You have an old card from two years ago that you initially failed three times while learning it. However, after practicing, you finally remembered it well and the card became mature. It is then rescheduled to today. Unfortunately, on the scheduled day, for some reason, you're not feeling well and no matter how hard you try, you cannot seem to remember the card. As a result, you fail the card, which counts as a lapse and triggers the leech mechanism. The card gets suspended, and you might never see it again. You might wonder why not manually reschedule any leech cards. That is indeed the standard practice. You are expected to periodically review the suspended leech cards, either by editing them or relearning them. However, this approach has a drawback: if the resurrected card fails once more, it will inevitably fall back into the pile of suspended leech cards. Especially with old, mature cards, failing to remember is often due to external factors or being in a bad state rather than actually forgetting the card. In such cases, a better approach may be to not count the lapse of the day towards a leech. How it Works The Forgiving Leech add-on addresses this issue by allowing you to define a period within which a card will only count as a leech if it fails more than the leech threshold within that period. Historical failures are not taken into account when determining leeches. Please note that this add-on only affects the procedure for determining leeches. It does not impact the scheduling of the card. If you fail a card, it will still count as a lapse and be rescheduled for the next day (based on the default setting). Configuration The default evaluation period is set to 365 days. However, you can customize this period by adjusting the add-on configuration. The leech threshold, leech action, etc are determined by your Preset setting. This add-on does not touch those. Source code: https://github.com/shouya/anki-addons/tree/master/forgiving-leech

GitHub repository: shouya/anki-addons