[Userscript] WaniKani Open Framework Statistics Filters

[ General Script Installation instructions ] :point_left: You’ll need a script host plugin like TamperMonkey
[ Open Framework Installation ]

Download the script here:

Description

This is a collection of filters for use with Self Study Quiz and Item Inspector scripts. The filters will be automatically added to the Filter tab in both software settings dialog.

The following statistics are covered.

  • Leech Value
  • Correct Answers for Meaning
  • Correct Answers for Reading
  • Incorrect Answers for Meaning
  • Incorrect Answers for Reading
  • Total Correct Answers
  • Total Incorrect Answers
  • Percentage of Correct Answers, Total
  • Percentage of Correct Answers, Meaning Only
  • Percentage of Correct Answers, Reading Only
  • Current Streak Meaning
  • Current Streak Reading
  • Maximum Streak Meaning
  • Maximum Streak Reading
  • Both Current Streak
  • Minimum Current Streak
  • Total Number of Reviews

For each statistics there is a pair for filters,

  • One for values greater or equal to the filter setting.
  • One for values less or equal to the filter setting.

Used together they define a range of values.

The exception is Leech Value where only the less or equal filter is provided. The greater or equal filter is the Leech Training filter from the Additional Filters script.

For the Both Current Streak filter, both the current meaning streak and the current reading streak must pass the filter test.

For the Minimum Current Streak filter, the minimum of the current meaning streak and the current reading streak must pass the filter test.

The handling of radicals is as follows:

  • For Correct Answers for Reading, Incorrect Answers for Reading, Percentage of Correct Answers, Reading Only, Current Streak Reading, and Maximum Streak Reading radicals always pass the test. This is to give the user the decision on how to handle them. If radicals are not wanted they must be filtered out by the Item Type filter.
  • For Total Correct Answers and Total Incorrect Answers the total for radicals include only meanings.
  • For Percentage of Correct Answers, Total, the percentage is calculated on the basis of meaning only for radicals.
  • For Both Current Streak and Minimum Current Streak the test is performed only on the meaning streak for radicals.

Note to developers

You should use wkof.wait_state('statsFilters', 'ready') .to wait for the completion of the filters initialization.

Version History

Version 1.4.0 - Added filters for Total Number of Reviews
Version 1.3.0 - Added support for wkof.wait_state('statsFilters', 'ready')
Version 1.2.0 - Improving the handling of radicals.
Version 1.1.0 - Fixed the handling of radicals, introduces Minimum Current Streak
Version 1.0.0 - Original release.

3 Likes

Don’t exclude it from your script on my account. :slight_smile:

1 Like

This is not exclusion. Additional filters is a requirement for Item Inspector. I don’t want the same filter installed twice in the filter list.

Neat

1 Like

Oh, I didn’t realize you were already requiring my script. :sweat_smile:

1 Like

Version 1.1.0 is out - Download it at the link on the top post.

Fixes the handling of radicals.

Introduces Minimum Current Streak which is useful for tracking leeches.

Version 1.2.0 is out - Download it at the link on the top post.

Improving the handling of radicals. See the top post for a description of how they are handled.

Version 1.3.0 is out - Download it at the link on the top post.

Added support of wkof.wait_state('statsFilters', 'ready'). Developers may now synchronize with the filters initialization.

Version 1.4.0 is out - Download it at the link on the top post.

Adds filters for Total Number of Reviews.