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!
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.
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!
Does not work with the later versions of Tampermonkey in Chrome. It does work with the Legacy version available at http://code.google.com/p/tampermonkey/
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.
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.
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.
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.