I sentence you, WaniKani! (userscript)

Lately there has been a few requests for sentences on WaniKani, so here’s a userscript that pulls sentences from jisho.org and puts them nicely formatted on the vocab pages like this.

I’ve tested it with Greasemonkey in Firefox and NinjaKit and Tampermonkey Legacy in Chrome. It should work with Ninjakit in Safari as well.
Please note that it does not work with newer versions of Tampermonkey.

Feedback and suggestions in any form is always welcome!

Latest version: v6.0

Download and more info
: http://userscripts.org/scripts/show/164239

Known issues:

  • Broken for now, fix comming Soon™

EDIT: Links…


Ha, worked on the same thing today. Nice work.

Hell yeah.

Btw, could you comment the code? I’m interested in understanding what’s happening.
Also, is it possible to change the font color of the word in the sentence? The bold is kind of barely noticeable. =)
Just aesthetic changes.

You get a cookie. http://www.youtube.com/watch?v=pEKBSAoNbgs (It’s secretly a tribute to you)

Absolutionz said... You get a cookie. http://www.youtube.com/watch?v=pEKBSAoNbgs (It's secretly a tribute to you)
Thanks. I actually enjoyed that song. I wish I was that good at the guitar as well (~_~)...
penx said... Lately there has been a few requests for sentences on WaniKani, so here's a userscript that pulls sentences from jisho.org and puts them nicely formatted on the vocab pages like this.

I've tested it with Greasemonkey in Firefox and NinjaKit and Tampermonkey Legacy in Chrome. It should work with Ninjakit in Safari as well.
Please note that it does not work with newer versions of Tampermonkey.


Feedback and suggestions in any form is always welcome!

Latest version: v6.0

Download and more info
: http://userscripts.org/scripts/show/164239

Known issues:

EDIT: Links...

 DO NOT USE THE SENTENCES FROM JISHO!!! THEY USE SENTENCES FROM THE TANAKA CORPUS. http://forum.jisho.org/discussion/207/denshi-jisho-in-japanese/p1
http://forum.jisho.org/discussion/1330/all-the-sentences-collected-in-this-site-are-correct-/p1
The Tanaka Corpus is a poor attempt at having a database of Japanese sentences and their English translation. Please google on the Tanaka Corpus. It was made by the oni himself. 

About the devil’s work: Tanaka Corpus:

  • Warnings about the English Sentences
    • This corpus has many sentences that don’t sound natural in English.
    • Many English sentences sound old-fashioned and are not likely to be used today by any native speaker.
    • Many of the sentences are of the kinds found in older “study for entrance exam books”, and thus are likely to have contrived examples of grammar usage or archaic English examples passed down from generation to generation by (Japanese) English teachers. They are not examples of normally-used modern English.
  • Warnings about the Japanese Sentences
    • This corpus has many sentences that don’t sound natural in Japanese.
    • Many Japanese sentences are obviously detailed translations of the English and are not the most natural way the ideas would be expressed in Japanese. (However, if you are an English teacher, they are good examples of how to explain English sentences in Japanese.)
  • Warnings about Both Languages
    • Most of the sentences were typed in by students as part of a project, but were not proofread by the teacher.
    • Some sentences sound as if they are computer translations.
    • Some sentences are not sentences.
  • There are many good examples, too.
    • If you know the target language somewhat, and don’t trust the examples too much without verifying them with a native speaker, then this is a usable set of examples and you can learn a lot by browsing through the sentences.
    • These sentences may also be good for Japanese reading practice. However, just remember that if these sentences are a high percentage of your “Japanese input,” you may be indirectly learning unnatural-sounding Japanese, which could affect the way you sound when you speak Japanese, in much the same way as men who learn most of their Japanese from a girlfriend start to sound a bit gay.
  • Further Warning
    • There are multiple, fairly impressive-looking websites using the Tanaka Corpus without ample warning. Remember this when you are on those websites. For a programmer, it’s easier to put together a website, than it is to proofread and edit sentences.
  • Invitation to Help
    • The Tanaka Corpus is now being maintained by tatoeba.org. You are invited to become a member and help make corrections and additions.
    • If you do decide to help, I would encourage you to only translate from your non-native language into your native language.
  • Yet Another Warning
    • Since there are a large number of non-native-speakers contributing to the Tatoeba.org database, additional errors and “less than natural” sentences are being created by those who are over-confident in their own foreign language ability.

タナカコーパスがきらいですか?

Apraxas said... タナカコーパスがきらいですか?
 No. The Tanaka Corpus sentences are as good as machine translation sentences. 

Thanks for releasing it!

Sucks I cant use it though, as i use a new version of Chrome.

derelleelearns said... Thanks for releasing it!

Sucks I cant use it though, as i use a new version of Chrome.
I'm running the latest stable version of Chrome and I can run the script with NinjaKit and Tampermonkey Legacy with no problems.
Juichiro said...  DO NOT USE THE SENTENCES FROM JISHO!!! THEY USE SENTENCES FROM THE TANAKA CORPUS. http://forum.jisho.org/discussion/207/denshi-jisho-in-japanese/p1
http://forum.jisho.org/discussion/1330/all-the-sentences-collected-in-this-site-are-correct-/p1
The Tanaka Corpus is a poor attempt at having a database of Japanese sentences and their English translation. Please google on the Tanaka Corpus. It was made by the oni himself. 
Hey, don't shoot the messenger.


Juichiro said... About the devil's work: Tanaka Corpus:

*snip*
I agree with what you're saying. Can you recommend a better site for sentences? I'll happily change the script or make an option to change the site used for  the sentences.
penx said...
Juichiro said...  DO NOT USE THE SENTENCES FROM JISHO!!! THEY USE SENTENCES FROM THE TANAKA CORPUS. http://forum.jisho.org/discussion/207/denshi-jisho-in-japanese/p1
http://forum.jisho.org/discussion/1330/all-the-sentences-collected-in-this-site-are-correct-/p1
The Tanaka Corpus is a poor attempt at having a database of Japanese sentences and their English translation. Please google on the Tanaka Corpus. It was made by the oni himself. 
Hey, don't shoot the messenger.


Juichiro said... About the devil's work: Tanaka Corpus:

*snip*
I agree with what you're saying. Can you recommend a better site for sentences? I'll happily change the script or make an option to change the site used for  the sentences.
Sorry, I am not aware of anything going on, HOWEVER, lang-8 has TONS of native corrected Japanese sentences that you can use. The downside is that you would have to search for them and compile them. :(
If I ever have time this summer I might compile them and send them to you. :)

Yeah, half of the sentences found on Tatoeba aren’t really something you should be learning from. Mostly all are “彼 this”, “彼女 that” and so on. You’re really better off going to Lang 8 and checking out people’s journals.

The script breaks user synonym input on vocabulary individual pages. 

I pin pointed it to the following section

if(start){
start[1].innerHTML = start[1].innerHTML +
‘<section id=“sentences”>’ +
‘<H2>Example Sentences</H2>’ +
‘</section>’;
}

I think the overwrite breaks the click bind for the user synonym form.

viet said... The script breaks user synonym input on vocabulary individual pages. 

I pin pointed it to the following section

if(start){ start[1].innerHTML = start[1].innerHTML + '<section id="sentences">' + '<H2>Example Sentences</H2>' + '</section>'; }
I think the overwrite breaks the click bind for the user synonym form.
It's working fine for me, maybe you have changed it since, seeing as this was 3 months ago.

On another note, jisho has changed so it's not possible to fetch the sentences like this anymore, will see if I can fix it.