[Userscript] WaniKani Sentences

WaniKani Sentences

I have written a userscript which will annotate items with:
  1. A set of sample sentences taken from Tatoeba
Note: Because I don't do any kind of word detection (to make everything faster), it may show some sentences that contain a word where the current word is a subset. For example, if 大人しい is in the sentence and you are looking at the word 大人, it will match the sentence anyway. It will also not find words that are commonly written in kana only (such as 美味しい).

Features

  1. Display sample sentences on the Vocabulary, lesson and review pages.
  2. Highlights the current word within the sentence.
  3. Links each word containing Kanji to the corresponding WaniKani page.
  4. Only sentences containing vocabulary you have learned on WaniKani will be displayed (initially).

Possible Future Features

None at the moment.

Installation

  1. Install Tapermonkey (Google Chrome) or Greasemonkey (Firefox)
  2. Install the script from GitHub.
  3. Go to the Accounts Page to setup the API key.
 I have tested it in Google Chrome.

Version History

3.0

Re-wrote the script to be neater and simpler.

2.1

Updated the script to work in Firefox.

2.0

Updated the script to be smarter about what it displays. It will only display sentences that contain Kanji-vocab that you have learned on WaniKani (once you have entered your API key). It will also link individual words back to their WaniKani pages. You can also 'explode' the sentence to split into it's constituent parts (this may help some people read the sentence).

This update breaks Firefox compatibility (which I will try to fix if I have time).

1.1

Updated the script to work in Firefox.

1.0

It works! Fixed up the formatting so it is a bit easier to read.

0.4

The current vocab item will now be highlighted inside the text.

0.3

Should now work on the review page and lesson page (still have to test the lesson page).

0.2

Added basic pagination (so that pages won't become insanely long for super common words).

0.1

Initial version. Only included basic (unprocessed) sentences on the vocabulary page.
4 Likes

Wow, Jeshua… You are a legend. Can’t wait to try this out :O 

YES! Thank you.

Awesome script! I think the sentences would be more helpful on the lessons page, though. 

nqthqn said... Awesome script! I think the sentences would be more helpful on the lessons page, though. 
 Should be implemented now. I don't have any lessons to test it with though :(

This is really amazing!!! Thank you!!! 

wow. Wanikani, hire this guy.

Wow!!! I can’t thank you enough for all the work you have put it. I think I can speak for everyone when I say…give this man a handshake!

Is it not working for anyone else?  I’m using firefox so that might be it.

Nysis said... Is it not working for anyone else?  I'm using firefox so that might be it.
 I haven't tested it on Firefox. I'll test it later this afternoon.

Hey, awesome script! Thanks for adding a much need addition to this site! I am using Chrome, and it works great when I look at a word on the definition page, but when check a word in the review (edit) or learning session I get this:

undefined息undefinedのundefined長undefinedいundefined仕undefined事undefinedにundefinedなundefinedりundefinedそundefinedうundefinedだundefined。undefinedThis is going to require a long steady effort.

undefinedあundefinedなundefinedたundefinedのundefined髪undefinedはundefined長undefinedいundefinedわundefinedねundefined。undefinedWhat long hair you’ve got!

undefined合undefined衆undefined国undefinedはundefined長undefinedいundefined間undefined「undefinedるundefinedつundefinedぼundefined」undefinedとundefinedしundefinedてundefined知undefinedらundefinedれundefinedてundefinedいundefinedるundefinedがundefined、undefinedそundefinedれundefinedはundefined国undefined民undefinedのundefinedほundefinedとundefinedんundefinedどundefinedがundefined移undefined民undefinedのundefined子undefined孫undefinedだundefinedかundefinedらundefinedでundefinedあundefinedるundefined。undefinedThe United States has long been known as a “melting pot” because most of its people are descended from immigrants.

Thanks again!

AlexAlex said... Hey, awesome script! Thanks for adding a much need addition to this site! I am using Chrome, and it works great when I look at a word on the definition page, but when check a word in the review (edit) or learning session I get this:

undefined息undefinedのundefined長undefinedいundefined仕undefined事undefinedにundefinedなundefinedりundefinedそundefinedうundefinedだundefined。undefinedThis is going to require a long steady effort. undefinedあundefinedなundefinedたundefinedのundefined髪undefinedはundefined長undefinedいundefinedわundefinedねundefined。undefinedWhat long hair you've got! undefined合undefined衆undefined国undefinedはundefined長undefinedいundefined間undefined「undefinedるundefinedつundefinedぼundefined」undefinedとundefinedしundefinedてundefined知undefinedらundefinedれundefinedてundefinedいundefinedるundefinedがundefined、undefinedそundefinedれundefinedはundefined国undefined民undefinedのundefinedほundefinedとundefinedんundefinedどundefinedがundefined移undefined民undefinedのundefined子undefined孫undefinedだundefinedかundefinedらundefinedでundefinedあundefinedるundefined。undefinedThe United States has long been known as a "melting pot" because most of its people are descended from immigrants.

Thanks again!
 Hey, that should be fixed now. Try updating :)

Is this working well for everyone? Sadly I had to disable all of the other WK addons I used to have a while back because they were causing several glitches. I’ll be happy to try this out if it is working smoothly. It really seems to have great potential. 頑張れ!

Whoa, this is awesome! Thanks for this, although I don’t really have time to try it out just yet.

Any chance of this being implemented in the WK android app? shameless hint to app dev :3

You, sir, are awesome!

msnaddie said... Whoa, this is awesome! Thanks for this, although I don't really have time to try it out just yet.

Any chance of this being implemented in the WK android app? shameless hint to app dev :3

 I would also love that hint hint.

Eternal-Illusion said... Is this working well for everyone? Sadly I had to disable all of the other WK addons I used to have a while back because they were causing several glitches. I'll be happy to try this out if it is working smoothly. It really seems to have great potential. 頑張れ!
 If you are using Google Chrome it seems to be working fine. I can't vouch for Firefox yet though. Why not give it a try? :)


very nice

jeshuamorrissey said...
AlexAlex said... Hey, awesome script! Thanks for adding a much need addition to this site! I am using Chrome, and it works great when I look at a word on the definition page, but when check a word in the review (edit) or learning session I get this:

undefined息undefinedのundefined長undefinedいundefined仕undefined事undefinedにundefinedなundefinedりundefinedそundefinedうundefinedだundefined。undefinedThis is going to require a long steady effort. undefinedあundefinedなundefinedたundefinedのundefined髪undefinedはundefined長undefinedいundefinedわundefinedねundefined。undefinedWhat long hair you've got! undefined合undefined衆undefined国undefinedはundefined長undefinedいundefined間undefined「undefinedるundefinedつundefinedぼundefined」undefinedとundefinedしundefinedてundefined知undefinedらundefinedれundefinedてundefinedいundefinedるundefinedがundefined、undefinedそundefinedれundefinedはundefined国undefined民undefinedのundefinedほundefinedとundefinedんundefinedどundefinedがundefined移undefined民undefinedのundefined子undefined孫undefinedだundefinedかundefinedらundefinedでundefinedあundefinedるundefined。undefinedThe United States has long been known as a "melting pot" because most of its people are descended from immigrants.

Thanks again!
 Hey, that should be fixed now. Try updating :)
 Awesome! Thanks! Works great!