Wednesday, December 21, 2011

Synonym filter by Nadav Kavalerchik and Big Huge Thesaurus

Here's a wonderful synonym filter I've just discovered for Moodle. If you teach English you might be interested in this. Maybe even excited.

What's the fuss about? Well here's a filter that allows the user to generate a tool-tip list of synonyms and antonyms just with the push of a mouse icon.

Links:
http://www.tikshuv.org.il/moodle/mod/resource/view.php?id=12095 
http://words.bighugelabs.com
http://tracker.moodle.org/browse/CONTRIB-1664.

Works great with Google Chrome. Note the clean and tidy appearance below:








The filter doesn't work well with Mozilla Firefox 8.0 since the tooltip keeps disappearing. Note also the disorganised array of synonyms and antonyms displayed compared to




STEPS TO SETUP THE SYNONYM FILTER ON YOUR MOODLE SITE

1. Here's the filter for you to download.
http://dl.dropbox.com/u/17797520/synonyms.zip

2. Extract the zip file and ftp the synonym folder to your Moodle site's filter folder.

3. Next head over to http://words.bighugelabs.com and sign up for a free account.

4. Then get an API key from the same website.

5. Then edit the file filter.php and locate the line that starts with
$apikey = '...';
    and copy and paste your BigHugeLabs API key inside the pair of apostrophes.

6. Go to Administration | Notification on your Moodle site.

7. Sure that the synonym filter's "eye" is on. Activate the filter.


8. To use it, inside a label, webpage or inside Moodle's editor,
    add the text [s: before your word, and ] after your word.
    For example
                           [s:beautiful]


Note: The filter.php has a slight modification to it (done by me!) so that words that end with a comma, fullstop or come just before a space, can be filtered into a synonym tool-tip link.

To change the color code of the tool-tip word, modify this code on line 62 from
$replace = '<span style="border-bottom:1px dashed blue;border-color:blue;" title="'.$synonyms.'">'.$synonym->word.'</span>&nbsp;';
to
$replace = '<span style="color:#005476;" title="'.$synonyms.'">'.$synonym->word.'</span>&nbsp;';
for example.

The effect will be the tool-tip text will not have the dashed underline,but rather be of a certain blue colour that could match your Moodle site's theme (at least for my site it matches!). See image below:



So what do you think of the change? Does it improve readability?


Have fun.
Remember to use Google Chrome.

Regards
Frankie Kam

If you like this post or site
a small donation would be nice but would last only a day,
otherwise leaving a comment (or a compliment) below will last me a month!

Ratings and Recommendations by outbrain