[Userscript] WaniKani Sentences


#1

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.

Example Sentences: USE KANJI WE'VE LEARNED
Is it possible to show alternate sentences?
What do you want now? (Request extensions here)
List of API and Third-Party Apps
The New And Improved List Of API and Third Party Apps
[iOS] Mobile AlliCrab for WaniKani
#2

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


#3

YES! Thank you.


#4

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


#5
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 :(

#6

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


#7

wow. Wanikani, hire this guy.


#8

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!


#9

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


#10
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.

#11

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!


#12
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 :)

#13

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. 頑張れ!


#14

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


#15

You, sir, are awesome!


#16
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.

#17
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? :)

#18



#19

very nice


#20
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!