[Userscript]: Anime Context Sentences


Is there a way it can only list these sentences for my leech items?

I mean outside seeing them only in lessons? Like a popup window as in self study quiz?

Amazing script! Absolutely love it. It fixes the main pain in the butt Wanikani has.

I’ve taken the liberty and tried to improve the script just a bit. Just as people already mentioned, there are a few small inconveniences while using it.
Wanikani Anime Sentences.user.js [gist.github.com]

  • Added On Click option to English and Japanese
  • Tweaked On Hover a bit, so it will show only the part you hovering on, not the whole example sentence. Actually changed just one word – moved :hover selector from parent to child.

I have no idea what to do with the audio though, it plays whenever you click anywhere, and it’s really useful behavior but not really compatible with the On Click option. I haven’t touched that,

I’m not the greatest js coder, but I hope it helps improve the script.

@Lahoje, @Orzelius If you guys wanna check out, update link – Wanikani Anime Sentences.user.js

1 Like

Excellent script, great idea. This script breathes life into the rather bland and boring vocabulary lessons and example sentences. You may even find that your recall of pronunciation and meaning of vocab items improves, hearing the voice acting in your head sometimes as you come across the terms in your vocab reviews (the 動いた! from Castle in the Sky really stuck with me).


Did this script break the regular example sentences or is that just my computer?

@psdcon I believe that api parameter sorting by Sentence length actually sorts in ascending order which is not great. And none outputs stuff in chronological order which is no good either. I changed request sorting to None and added sorting inplace, though I wonder what options for order should there be? Filtering by distinct title maybe? Random shuffle?

I think this problem should already be fixed in this fork of the Advanced Context Sentence script:


Creator and maintainer of the API server here.

Currently you can use shortness and longness to sort the results. sentence length is a soon to be deprecated value which is equivalent to shortness.

In the future, I might add a popularity sort by counting the number of times a sentence has been added to someone’s list (on the Immersion Kit website).

Some kind of sort according to number of words in JLPT Level / WaniKani Level is also possible. Obviously that would involve scoring the difficulty of a sentence with the number/percentage of words. Is a sentence with 5 N2 words and 2 N4 words more difficult than a sentence with only 2 N1 words?

Let me know if there are any sorting options you would like to see.

1 Like

Ah, thank you! I’ve downloaded the fix

For everyone maintaining or updating this script, what about the elimination of overly short sentences? Or restricting sentences to 4+ characters?

As much as I love FMA, remembering the context of these scenes was difficult (and frankly I only just barely can tell when the last one is). Having overly short sentences can defeat the purpose of having context in the first place.

1 Like

Beautiful script! Thank you!

1 Like

Hello, author here. Thanks everyone for the feedback.

The following changes are included in v1.1.0.

  • Number of sentences is in a scrollable region and limited to 50. (PR to add infitie-scolling instead would be welcome :slight_smile: )
  • Sort sentences by longest or shortest first.

Hi @DIO-Berry. I’m delighted you’re getting value from the script. To address your problem here, in v1.1.0 I’ve removed the option to choose the number of sentences, and instead made it a scrollable list. Now you can skip past the short sentences, but still benefit from seeing them in context which might be useful for other shows/movies/vocab.

You can also sort the sentences by shortest or longest first, which would help in this case too.

Any other suggestions, let me know :slight_smile:


https://v2.immersionkit.com/ is even more beautiful. Nice work @mathewthe2 !


Hi Mathew. It’s great to see you here! Apologies I missed your post about this on the discord. I’ve updateed the URL query with “sort=shortness” so now the “sentence length” option can be removed, but I’ve actually duplicated the sorting logic so that it can be changed through the settings without making another API request.

I love the idea of popularity. Difficultly – that would be awesome, I’m sure there’s probably literature on this that we could use. :thinking:

Thank you so much for your additions @daikirai ! I’m impressed. I included them all in the v1.1.0 update :slight_smile:


Hi @Orzelius, great feedback!

  1. @daikirai checked this off :slight_smile:
  2. v1.1.0 adds the options to sort sentences by shortest or longest first.
  3. I’ll clarify before commiting. If I understand, in vocab reviews, you’d like to see the sentence only after you get the item correct, before proceeding to the next item (you’re obviously not using lightening mode from Double Check?). So you dont want to use it as a potential prompt (like in the script you linked), but for reenforcing the word? I’d like to hear your reasoning/intention here. Also, do you think the image, audio, and translation should be included, or just the japanese sentence?

It’s very generous of you to offer to send money. Immersionkit.com run by @mathewthe2 is the service that does all the heavy lifting here and has monthly running costs :slight_smile: I’m not officially connected but any proceeds should definetly go to the donate button on the site.

Hi @APerson962. In the screenshot I’ve selected “Wolf Children” to be included, so they’re highlighted blue. By default, all the Ghibli films are included - they’re grey in the screenshot because that list isn’t selected.

1 Like

for point 3. Yes, this won’t work with lightning mode. I was thinking exactly the same functionality as the WaniKani Context Sentences in Reviews script, just with anime and audio, but actually from trying out your script for the past week or so I think I prefer the wanikani context sentences, as they’re way more varied than anime ones and are made especially to help memorize/contextualize the given word. Also quite often there are no anime sentences for some words even if all of the anime is selected

Do you have a repo where this script is hosted, I would consider contributing myself but I had no luck finding it.

Again, thank you soo much for this, this is a great asset for many Japanese learners and will help tons of people!

Thanks for elaborating. The repo is GitHub - psdcon/wanikani-anime-sentences: Wanikani userscript for adding example sentences from popular anime to new vocabular., but there’s not much more here than the content of the usescript :slight_smile:

Thank you! I appreciate it. I’ll download the update asap