[Userscript]: Anime Context Sentences

Wanikani Anime Sentences

A userscript which adds context sentences from anime movies/shows for vocabulary. Sentence database from Immersion Kit - see information for a list of titles.

[ General Script Installation instructions ] :point_left: You’ll need a script host plugin like TamperMonkey
[ Open Framework Installation ]
[ Download / Install “Anime Sentences” ]

Script features:

  • Adds Japanese sentence and English subtitle, complete with audio and picture. Up to 50 sentences are shown in a scrolling list.
  • Sentences can be are ordered with the shortest or longest first.
  • Japanese and/or English can be hidden behind hover or click to test listening comprehension and understanding.
  • Avoid spoilers by selecting specific titles.
  • Change the audio playback speed.
  • Limit sentences to your WaniKani level so there’s a maximum of 1 unknown word.

Note:

  • English is from subtitles, not a direct translation, so they might reference context outside the Japanese sentence.
  • Furigana is machine generated and may not match the audio. It can be turned off altogether if it’s distracting.

Screenshots:

Source code at github.com/psdcon/wanikani-anime-sentences. Feedback, forks & PRs welcome.

45 Likes

This looks great thank you for sharing!!

3 Likes

I love this concept! Looks fantastic :eyes:

4 Likes

Woah, this is seriously cool! A fantastic way to reinforce vocab with story context, and should be especially impactful if you only select stories you are familiar with.

Some sort of repetition would make this really impactful. Do the clips appear anywhere outside of the lessons page? Item pages would be okay, but when I was still going through Wanikani, I personally didn’t look at the item pages much. I mostly used Self-Study Quiz (SSQ) and the reviews themselves.

I would have loved to pair this with Self-Study Quiz… maybe by adding a hook in SSQ to call your script (if present) to play an anime clip any time the regular audio clip is normally played.

2 Likes

I really like this script! And I’m glad that my library script was useful. :slight_smile:

This script uses WK Item Info Injector to add the anime context sentences in lessons, the lesson quiz, reviews, and on the item page.

As far as I can tell, SSQ does not contain an item info section like the normal WK review does? Otherwise, I could have modified WK Item Info Injector to also inject the info into SSQ.

1 Like

I wasn’t thinking of an Item Info section… more along the lines of: when you answer an item correctly in the quiz, the anime clip plays in a small window to the side of the answer, or something like that.

But also, an item info popup could be added to SS Quiz. I don’t have time to do it myself at the moment, but I would consider either merging someone’s implementation into SS Quiz, or support some sort of integration (such as an item-info button and/or hotkey) to do a callback for a separate SSQ Item Info script.

I suggest to include a link to the item info page with target="_blank". This way all item info scripts become available at once.

This is a great idea for a script. I’ve been trying it out since yesterday and it looks great :grin:

I have found some issues with transitivity pairs though. For example, for (おどろ)かす all context sentences that appear use the intransitive (おどろ)く instead.

Something similar seems to happen for a few of the other verbs using the same kanji. For example some of the context sentences for ()かす use ()く instead and vice versa. I assume it probably has something to do with how the okurigana is handled.

Wow thanks a lot!! Now WaniKani’s weakest aspect is something I can enjoy.

1 Like

It looks like there might be some issues. These were the sentences for ()

1 Like

This is such a brilliant idea. Being able to contextualize the words in this way really helps me understand and remember them. Thank you for working so hard on this.

I hope the folks over at Immersion Kit will be adding even more anime titles that we can learn from.

This is so awsome, i already feel like it helps the Leeches stick. :smiling_face_with_three_hearts:

Thank you soo much for this, this is really cool. There are a few things I’d like added, here they are, ordered by implementation difficulty:

  1. English only on click (just when the japanese text is clicked, show eng). Then I can use my on-hover dictionary just to look up the kanji/words I’m not too sure about without spoiling the meaning of the entire sentence.
  2. Order by → longest sentences first. The short one are way too short ):
  3. Show the first by order example when the word has been answered correctly right in the ui without having to go to the details.

The last one is quite tough as I can image, but you can steal a lot of code from this example sentence script that does exactly that: WaniKani Context Sentences in Reviews

If you can do all the three aboce, I’ll paypal you like 50usd or something. If you don’t feel like coding that much, maybe you have a repo for the code and I can do that myself if I feel like it.

2 Likes

This seems really cool! Just downloaded it there, looking forward to using it!

One question though, how do you select specific titles to use on it? I can’t really figure it out. Sorry if I’m just missing something and being stupid!

Thank you for making this!

Seconding this, as long as you could still click the audio button without showing the English sentence. Even just a “Never” option for English would be nice IMO (like there is for Furigana).

image

Other than the fact that I can’t play the audio (or hover over the Japanese words) without showing the English translations I’m really loving this script!

2 Likes

great!

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).

2 Likes

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?
https://gist.github.com/memosiki/259836ad62818d106acd5a9408fbf590/revisions