# \[Userscript\] Word Frequency Filter

**URL:** <https://community.wanikani.com/t/userscript-word-frequency-filter/66328>\
**Category:** API And Third-Party Apps\
**Created:** [June 22, 2024, 9:02am UTC](https://community.wanikani.com/t/userscript-word-frequency-filter/66328 "2024-06-22T09:02:55Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Wyverex](https://sea1.discourse-cdn.com/wanikanicommunity/user_avatar/community.wanikani.com/wyverex/32/696113_2.png) [@Wyverex](https://community.wanikani.com/u/Wyverex)\
**Post date:** [June 22, 2024, 9:02am UTC](https://community.wanikani.com/t/userscript-word-frequency-filter/66328/1 "2024-06-22T09:02:55Z")

</div>

[General script installation guide](https://community.wanikani.com/t/12136)  
[Open Framework installation](https://community.wanikani.com/t/28549)  
[Install Word Frequency Filter](https://greasyfork.org/en/scripts/498297-wanikani-word-frequency-filter)

# Purpose

This script allows you to easily select which words you care about at a given WK level and only learn those while ignoring the rest.

Learning all the vocabulary that WaniKani offers at each level isn’t necessarily useful. There are a lot of infrequently used words which ultimately just increase your daily review time without providing much immediate value.

While there are scripts that can give you kanji frequencies, there was no script that could do the same for words, so here it is.

## Word frequency lists

The script comes with a number of frequency lists:

- Innocent Corpus [Source](https://foosoft.net/projects/yomichan/index.html)
- Anime list [Source](https://www.reddit.com/r/LearnJapanese/comments/ilobcq/word_frequency_list_based_on_anime_and_some/)
- Wikipedia [Source](https://en.wiktionary.org/wiki/Wiktionary:Frequency_lists/Japanese2022_10000)

Each word in WK is annotated with its rank according to those lists (rounded to the next 100). Those ranks show up in various places:

- Lesson picker tooltip  

- Vocabulary list, level list, kanji list and search page:  
 ![image](https://global.discourse-cdn.com/wanikanicommunity/optimized/4X/2/5/b/25b18350472a34be431076b430da54db23852e2c_2_517x53.png)

- Vocabulary page  

- Lesson & review page  

## Settings

In the settings popup you can decide which of the word lists to use as your main list. In addition to the lists themselves, you can choose between `Best` (use the best rank of all lists) and `Average` (use the average rank of all lists).

 ![image](https://global.discourse-cdn.com/wanikanicommunity/original/4X/0/9/1/091465ed33ee4eec673b4f54877a6cb035b5326f.png)

You can also choose whether to show word ranks during reviews.

## Word grouping on the lesson picker

Words on the lesson picker are automatically reordered according to the selected rank. Lowest ranks appear first in the list. You can also set a rank cutoff in your settings which causes all words with a higher rank than the cutoff to be grouped into the “Beyond cutoff” section.

 ![image](https://global.discourse-cdn.com/wanikanicommunity/original/4X/5/6/2/562a81dc739a80ce42340e01b5ba168d18e18d00.png)

### Marked words

While using a frequency list is very useful, blindly relying on it is not recommended either. That’s why you can hover over each word to see its meaning and ranks. If you decide that you want to learn a word although it’s beyond the cutoff, but maybe you don’t want to learn it _right now_, you can just select it and click the `Toggle Mark` button which will put the word into the `Marked` section.

 ![image](https://global.discourse-cdn.com/wanikanicommunity/original/4X/6/8/4/6846e7f8171d96591e808b6b8786cb482d12572c.png)

# Other word lists

If you have any particular word lists that you’re using and that you’d like to see included in this script, please leave a comment and a link to the word list and I’ll see if I can add it.

# But I’m not learning all the words…

When I started using this, I had this weird sense of FOMO when I saw words piling up that I wasn’t learning. But when I realized (with the help of the tooltips on the lesson picker) that most of the words weren’t immediately useful to me, my perception changed and now I’m very happy not to clutter my daily review time with words I don’t use.

Your experience might be similar. And if you do find that you need to learn a word that you’ve skipped earlier, you can always do it later! Just use WK’s search function and if the word turns up as unlocked, you know where to find it.

# Other scripts

Note that this addon has synergies with two of my other addons which you might like:

- [Daily Vocab Planner](https://community.wanikani.com/t/userscript-daily-vocab-planner/66058)  
If chosen in Daily Vocab Planner’s settings, only words below the cutoff, as well as marked words, are considered for your daily vocab progress and for calculating vocab unlocks.
- [Vocab Reading Analyzer](https://community.wanikani.com/t/userscript-vocab-reading-analyzer/66183)  
The screenshots above were taken with this script active (which is why the vocab items are colored)!

# For developers

The script exposes a `wff` object that contains these entries:

- `FrequencyData`: A map of term → frequency data, e.g `板:{i:3,w:2251,a:6058}`. Each frequency data object contains the term’s rank in the given word list. Each object has at least one rank but not necessarily all of them
- `getRank(data)`: Given a frequency data value from `FrequencyData`, return the rank according to the user’s settings
- `isMarked(subjectId)`: Given a subjectId, return whether the word was marked by the user

# Feedback

I hope this is useful to you guys. Please let me know if you have any issues, feedback or feature requests in the comments.

> **Changelog**
>
> 1.3.0: Tooltips in lessons and reviews; Ranks in reviews are optional  
> 1.2.0: Show word rank on lesson and review pages  
> 1.1.1: Annotate words on search page

---

<div class="post-metadata">

**Author:** ![Inserio](https://sea1.discourse-cdn.com/wanikanicommunity/user_avatar/community.wanikani.com/inserio/32/92_2.png) [@Inserio](https://community.wanikani.com/u/Inserio)\
**Post date:** [June 22, 2024, 3:18pm UTC](https://community.wanikani.com/t/userscript-word-frequency-filter/66328/2 "2024-06-22T15:18:16Z")

</div>

Pretty neat, even to just use as a quick reference to the various frequency lists for each new vocab as you’re learning them.

---

<div class="post-metadata">

**Author:** ![Wyverex](https://sea1.discourse-cdn.com/wanikanicommunity/user_avatar/community.wanikani.com/wyverex/32/696113_2.png) [@Wyverex](https://community.wanikani.com/u/Wyverex)\
**Post date:** [June 22, 2024, 5:18pm UTC](https://community.wanikani.com/t/userscript-word-frequency-filter/66328/3 "2024-06-22T17:18:27Z")

</div>

1.1.1: Annotate words on search page as well

---

<div class="post-metadata">

**Author:** ![cezarL](https://sea1.discourse-cdn.com/wanikanicommunity/user_avatar/community.wanikani.com/cezarl/32/779325_2.png) [@cezarL](https://community.wanikani.com/u/cezarL)\
**Post date:** [June 23, 2024, 4:52am UTC](https://community.wanikani.com/t/userscript-word-frequency-filter/66328/4 "2024-06-23T04:52:53Z")

</div>

Would it be possible to also display the frequency info on the lesson and review pages?  
For reviews, somewhere in the top section without having to expand the “item info” section during reviews… (similar to how the pitch accent script works?)

---

<div class="post-metadata">

**Author:** ![Wyverex](https://sea1.discourse-cdn.com/wanikanicommunity/user_avatar/community.wanikani.com/wyverex/32/696113_2.png) [@Wyverex](https://community.wanikani.com/u/Wyverex)\
**Post date:** [June 23, 2024, 12:27pm UTC](https://community.wanikani.com/t/userscript-word-frequency-filter/66328/5 "2024-06-23T12:27:46Z")

</div>

There you go!

1.2.1: Show ranks on lesson & review pages

---

<div class="post-metadata">

**Author:** ![cezarL](https://sea1.discourse-cdn.com/wanikanicommunity/user_avatar/community.wanikani.com/cezarl/32/779325_2.png) [@cezarL](https://community.wanikani.com/u/cezarL)\
**Post date:** [June 23, 2024, 1:32pm UTC](https://community.wanikani.com/t/userscript-word-frequency-filter/66328/6 "2024-06-23T13:32:28Z")

</div>

Thanks!  
It works as advertised 🙂  
That is, showing the top ranking. Would be cool if it could show full info on these pages like on the vocab page, but no big deal if that’s not possible or too messy to design.  
It’s a very nifty script regardless 😁

Having the ranking visible makes me feel a little better when I fail a review for some less frequent item (nice!) but also a little worse when it’s a frequent one (oh, well! 🙂 )

---

<div class="post-metadata">

**Author:** ![Inserio](https://sea1.discourse-cdn.com/wanikanicommunity/user_avatar/community.wanikani.com/inserio/32/92_2.png) [@Inserio](https://community.wanikani.com/u/Inserio)\
**Post date:** [June 23, 2024, 2:49pm UTC](https://community.wanikani.com/t/userscript-word-frequency-filter/66328/7 "2024-06-23T14:49:07Z")

</div>

I would personally like a way to hide the frequency information during reviews, because it feels like it could end up forming an association with the item in one’s memory in a way that’s detrimental to overall learning.

---

<div class="post-metadata">

**Author:** ![Wyverex](https://sea1.discourse-cdn.com/wanikanicommunity/user_avatar/community.wanikani.com/wyverex/32/696113_2.png) [@Wyverex](https://community.wanikani.com/u/Wyverex)\
**Post date:** [June 23, 2024, 3:26pm UTC](https://community.wanikani.com/t/userscript-word-frequency-filter/66328/8 "2024-06-23T15:26:52Z")

</div>

@cezarL @Inserio

Implemented both 🙂

1.3.0: Tooltips in lessons and reviews; Ranks in reviews are optional

---

<div class="post-metadata">

**Author:** ![Ibby](https://sea1.discourse-cdn.com/wanikanicommunity/user_avatar/community.wanikani.com/ibby/32/825_2.png) [@Ibby](https://community.wanikani.com/u/Ibby)\
**Post date:** [January 12, 2025, 8:17am UTC](https://community.wanikani.com/t/userscript-word-frequency-filter/66328/9 "2025-01-12T08:17:12Z")

</div>

Thank you very much for making this. Sorry if it’s a dumb question, but where are the settings located?

---

<div class="post-metadata">

**Author:** ![cezarL](https://sea1.discourse-cdn.com/wanikanicommunity/user_avatar/community.wanikani.com/cezarl/32/779325_2.png) [@cezarL](https://community.wanikani.com/u/cezarL)\
**Post date:** [January 12, 2025, 8:29am UTC](https://community.wanikani.com/t/userscript-word-frequency-filter/66328/10 "2025-01-12T08:29:49Z")

</div>

Open the WK Menu, then under Settings → Scripts there will be an entry for it.

 ![image](https://global.discourse-cdn.com/wanikanicommunity/original/4X/d/8/e/d8ea3c0406d0322dd17e75a5e8dbb51c07b01c61.png)

---

<div class="post-metadata">

**Author:** ![Ibby](https://sea1.discourse-cdn.com/wanikanicommunity/user_avatar/community.wanikani.com/ibby/32/825_2.png) [@Ibby](https://community.wanikani.com/u/Ibby)\
**Post date:** [January 12, 2025, 8:50am UTC](https://community.wanikani.com/t/userscript-word-frequency-filter/66328/11 "2025-01-12T08:50:16Z")

</div>

Thank you so much !!

---

<div class="post-metadata">

**Author:** ![readoll](https://sea1.discourse-cdn.com/wanikanicommunity/user_avatar/community.wanikani.com/readoll/32/752187_2.png) [@readoll](https://community.wanikani.com/u/readoll)\
**Post date:** [August 1, 2025, 6:04pm UTC](https://community.wanikani.com/t/userscript-word-frequency-filter/66328/13 "2025-08-01T18:04:20Z")

</div>

Looks like there’s a bug where the lesson picker tooltips don’t load properly if you navigate to the lesson picker from the main menu; they only load if you refresh the page while on the lesson picker. I fixed this by updating line 202 in the `postNavigate` function from:  
`annotateLessonPicker();`  
to  
`wkof.ready("ItemData").then(loadItems).then(annotateLessonPicker);`  
This insures that the item data is always loaded when navigating to the lesson picker.

I also noticed that “toggle mark” button will randomly duplicate. Doesn’t really effect functionality, but is a bit odd.

---

<div class="post-metadata">

**Author:** ![ConBaron](https://sea1.discourse-cdn.com/wanikanicommunity/user_avatar/community.wanikani.com/conbaron/32/733290_2.png) [@ConBaron](https://community.wanikani.com/u/ConBaron)\
**Post date:** [August 17, 2025, 7:08am UTC](https://community.wanikani.com/t/userscript-word-frequency-filter/66328/14 "2025-08-17T07:08:16Z")

</div>

I can’t seem to look at the Innocent Corpus anymore

[Routledge 5000 Vocab - Kanshudo](https://www.kanshudo.com/collections/routledge) I found this one which seems good though, seems like it would be useful for early levels

---

<div class="post-metadata">

**Author:** ![additionalramen](https://sea1.discourse-cdn.com/wanikanicommunity/user_avatar/community.wanikani.com/additionalramen/32/701581_2.png) [@additionalramen](https://community.wanikani.com/u/additionalramen)\
**Post date:** [October 6, 2025, 9:35pm UTC](https://community.wanikani.com/t/userscript-word-frequency-filter/66328/15 "2025-10-06T21:35:24Z")

</div>

Is it possible that the (I think mostly aesthetic) changes to the lesson picker that were published today could have broken this script? It doesn’t seem to be working for me right now, but I don’t know enough about Computer Stuff to know whether to blame myself or something else…

---

<div class="post-metadata">

**Author:** ![readoll](https://sea1.discourse-cdn.com/wanikanicommunity/user_avatar/community.wanikani.com/readoll/32/752187_2.png) [@readoll](https://community.wanikani.com/u/readoll)\
**Post date:** [October 8, 2025, 7:49pm UTC](https://community.wanikani.com/t/userscript-word-frequency-filter/66328/16 "2025-10-08T19:49:49Z")

</div>

Yup, it was broken by the most recent update. You can fix it by going into tamper monkey and updating the `annotateLessonPicker` function. For me that’s on line 428, but I’ve made changes to this file before so our line numbers could differ slightly. For simplicity, here’s the first 16 lines of the function that contains all the necessary changes (lines 428-444 for me). If you just copy this over the existing function (just the first 16 lines!) it should 🤞 work.

```javascript
function annotateLessonPicker(isUpdate = false) {
    const subjectElements = document.querySelectorAll(".subject-character__characters-text");
    const rootsWithWordsBeyondCutoff = new Set();
    const rootsWithMarkedWords = new Set();
    const cutoff = shared.settings.rankCutoff;
    const MarkedOrder = 100000;
    const CutoffOrder = 200000;
    const CutoffOrderOtherRanks = 300000;
    const CutoffOrderNoData = 400000;
    for (let element of subjectElements) {
      const typeParent = element.parentElement.parentElement.parentElement;
      if (!typeParent.classList.contains("subject-character--vocabulary")) {
        continue;
      }
      const root = typeParent.parentElement;
      const subjectId = parseInt(root.getAttribute("data-subject-id"));
      const data = FrequencyData[element.innerHTML.replace('\n', '').trim()];

```

> **The specific changed lines**
>
> For full transparency, the only changed lines are the ones that start with: `const subjectElements`, `const typeParent`, and `const data`. Lines 429, 438, and 444 for me respectively.
> 
> The issue was that there were some slight structural changes in the html of the vocab containers. Nothing major but just enough to break the script lol.

Hope that’s helpful even for a non computer stuff knower!

---

<div class="post-metadata">

**Author:** ![additionalramen](https://sea1.discourse-cdn.com/wanikanicommunity/user_avatar/community.wanikani.com/additionalramen/32/701581_2.png) [@additionalramen](https://community.wanikani.com/u/additionalramen)\
**Post date:** [October 8, 2025, 8:18pm UTC](https://community.wanikani.com/t/userscript-word-frequency-filter/66328/17 "2025-10-08T20:18:04Z")

</div>

That worked! You’re a rockstar, thank you!!

---

<div class="post-metadata">

**Author:** ![frxncezca](https://cdck-file-uploads-global.s3.dualstack.us-west-2.amazonaws.com/wanikanicommunity/original/3X/f/d/fd4c154120954695f788402f3bcf4e616499bc2d.png) [@frxncezca](https://community.wanikani.com/u/frxncezca)\
**Post date:** [October 10, 2025, 1:14am UTC](https://community.wanikani.com/t/userscript-word-frequency-filter/66328/18 "2025-10-10T01:14:40Z")

</div>

I wonder if a script like this exists for jlpt level

---

<div class="post-metadata">

**Author:** ![frxncezca](https://cdck-file-uploads-global.s3.dualstack.us-west-2.amazonaws.com/wanikanicommunity/original/3X/f/d/fd4c154120954695f788402f3bcf4e616499bc2d.png) [@frxncezca](https://community.wanikani.com/u/frxncezca)\
**Post date:** [October 10, 2025, 1:17am UTC](https://community.wanikani.com/t/userscript-word-frequency-filter/66328/19 "2025-10-10T01:17:53Z")

</div>

> [@readoll](#):
>
> `const data = FrequencyData[element.innerHTML.replace('\n', '').trim()];`

Thank you!!!

---

<div class="post-metadata">

**Author:** ![Special-Guest](https://cdck-file-uploads-global.s3.dualstack.us-west-2.amazonaws.com/wanikanicommunity/original/3X/f/d/fd4c154120954695f788402f3bcf4e616499bc2d.png) [@Special-Guest](https://community.wanikani.com/u/Special-Guest)\
**Post date:** [February 5, 2026, 5:58am UTC](https://community.wanikani.com/t/userscript-word-frequency-filter/66328/20 "2026-02-05T05:58:29Z")

</div>

Im more than an idiot some days but where is the Settings pop-up? I cant seem to locate it.

---

<div class="post-metadata">

**Author:** ![gdxcdkpqr](https://cdck-file-uploads-global.s3.dualstack.us-west-2.amazonaws.com/wanikanicommunity/original/3X/f/d/fd4c154120954695f788402f3bcf4e616499bc2d.png) [@gdxcdkpqr](https://community.wanikani.com/u/gdxcdkpqr)\
**Post date:** [June 24, 2026, 11:03am UTC](https://community.wanikani.com/t/userscript-word-frequency-filter/66328/21 "2026-06-24T11:03:48Z")

</div>

For me I have to go the front page, then reload once, then click on my avatar up in the right corner. If I don’t reload, my script settings do not show.

[Next page](https://community.wanikani.com/t/userscript-word-frequency-filter/66328.md?page=2)
