Example Sentences Userscript

Figured with the old forum gone I should create a new topic for this…

Check link for instructions on usage, the basic gist is you get example Chinese sentences while learning/reviewing, plus there is some nice character colouring, keyboard shortcuts and so on.

5 Likes

I found an issue causing by memrise relabelling Chinese courses, fixed in version 1.1.21

2 Likes

Hi Cooljingle,
First, Thank you so much for writing/updating these userscipts. You’re a boss!
So I noticed that in this script, it’s limited to the “Simplified” chinese category. Will you release a Traditional update? If not, it’s ok, your other scripts are amazingly helpful. But it would be nice to note that in the description, because at first I couldn’t figure out why the script was not working for me.
This is the course I am using: https://www.memrise.com/course/212622/tc-tocfl-level-1-traditional-chinese/
Cheers!
Thank you again. =]

Yeah this script is for simplified only, the source of the example sentences (linedict) doesn’t provide a traditional character version… although on second thought it would be possible to use a translation service to go parse them into traditional characters - if I get round to implementing it I’ll let you know!

Been using your Chinese Examples userscript for about a year now, I have to thank you for this script, really awesome. But ever since the recent update yesterday (1.1.23), the examples haven’t been showing up. I get the word flash on the left side, but sentences aren’t coming up.

thanks for bringing this up - memrise’s switch to https means the request for examples must be https also, only problem is that linedict doesn’t support https requests… i’ll have to look into this, hopefully it can be fixed!

cool, thanks for your quick reply!

It works now, you’re a wizard cooljingle!

errr my wizard powers aren’t that strong… I haven’t updated the script yet! I did however find a workaround fix which will go in the next update (which I’ll submit shortly).

Thanks for the update! If you have something like the NoScript addon installed, you now need to allow cors-anywhere.herokuapp.com.

I’ve added support for traditional characters to the script - when doing a course with traditional chinese it does on-the-fly translations of the sentences to their traditional form.

latest is 1.2.1

Doesn’t work anymore. Worked a few weeks ago.

Fixed! Latest is 1.2.2

Not working for me lately 哭。
I can see the pinyin and the English but not the Chinese characters for the example sentence. Even the audio plays. I have the latest version of Chrome. Version 61.0.3163.100 (Official Build) (64-bit)
Frustrating as I have really gotten used to spending time on the examples and found it super-helpful.

I’ve fixed the issue - latest version is v1.2.3

Thanks so much!

This script is simply amazing! Thanks so much! I’ve been trying to modify the tone colors in the script - I’ve been using a slightly different tone coloring than what the script has by default for years, and it’s hard to get used to a different coloring scheme now. It looks like one should be able to change the default colors from the “Example Settings” window that is accessible from the review page in Memrise, but if I click on a color nothing happens (I am on Chrome for Mac). I tried changing the colors directly in the script, because I just need to swap some colors around, but I’m not very knowledgeable about the script language. I found the part that contains the htlm color codes, and tried swapping color codes there (see below), but nothing happens in Memrise either (the colors stay the same after modifying color codes in that part of the script). Any help with this would be greatly appreciated! Thanks!

defaultSettings = {
… … …
“tone-1”: “#e30000”,
“tone-2”: “#8900bf”,
“tone-3”: “#02b31c”,
“tone-4”: “#1510f0”,
“tone-5”: “#777777”,

@cooljingle

Are there any online databases for Portuguese (BR) or other Romance languages where you could pull 3-5 example PT sentences from for a single word?

The DuoLingo PT BR course e.g quite often uses single words and infinitive (not conjugated) verbs.

An additional button “Pull some example sentences” would be quite sufficient, so you do not have to retrieve them each time for every shown word.

Often there are some (single) words, no matter how often you strengthen or re-learn them, they are quite weak and/or difficult and without good examples and seeing them in multiple contexts, you will probably NEVER learn them 100% successful, so you can better RECALL them the next time.

Turns out the color picker was no longer working after a Memrise update; with the latest script version (1.2.5) it should be functional again.

As an aside, your script edit may have not worked because the settings are saved locally to prevent future updates affecting them.

1 Like

I’ve thought of using https://tatoeba.org/ to make a more general example sentences userscript which would work for more languages, it doesn’t have an api but you could scrape the data off the pages - one for my todo list.