WebVocab is a simple utility to replace words in Firefox (Greasemonkey enabled) browsers with another, user-specified, word. It is intended as a vocabulary study tool/game.
If, for example, you are trying to learn your colors in Latin, WebVocab might replace all the instances of red in your web browser with the word RUFUS.
I think I've removed the kinks from the web generation system. Give it a shot!
You don't need Perl anymore to create your own vocab entries!! See the online generation section below!
To make this work, all you need is:
Optionally, if you'd like to generate the user scripts on your own computer (rather than using the web generation system) you'll need a working installation of Perl. If you opt to build your files locally, you'll also need the latest version of the generation code. Don't worry about this if the idea of installing Perl scares you. Just use the online interface!
Assuming you have Greasemonkey working under Firefox, click this: example_vocab.user.js. If Greasemonkey is properly installed, you will see an option at the top of your browser to install the small example script. Install the script and you're set!
The example script just has a few types of words defined. They are the first few ordinal and cardinal numbers, a few words involving dates/times, and some colors in Latin. If you start browsing around, you should see these types of words being replaced by their all-capitals Latin equivalent.
Vocab word pairs are stored in a very simple file format. It's probably easiest for you to just look at the short example vocab file.
Each line contains one vocab entry, where the English and Latin words (or German, Spanish, etc.) are separated by a colon (:). Comments can begin anywhere on the line with the # symbol, and lines that have no non-commented text (that is, they have no vocab entry), are simply ignored. You'll probably want to comment and use blank lines to structure your vocab files so they are easy to maintain.
Here is a small example snippet of a vocab definition file.
#some simple example vocab entries #some nouns bishop:antistes #this is singular bishops:antistites #this is the plural form #now let's add a number fourth:quartus
Generating a vocab script is now easy to do online. Just edit and save your vocab file on your own machine and use the following form to upload it. After you've uploaded your file and the generator is finished, just save the output to your machine with a '.user.js' ending, point Firefox to it, and install as before.
The generate_GM_user_script.pl Perl script compiles .user.js files locally. It takes two arguments: 1) the input vocab file and 2) the output user script file to create. Note that user scripts (what gets read in by Greasemonkey) MUST end with '.user.js'. If you're output file doesn't contain the '.user.js' ending, it will be appended automatically.
Assuming the generate_GM_user_script.pl works okay, point Firefox to your new user script and install as before. Your updated vocabulary should now be "translated" in the browser. Enjoy!
WebVocab let's you add additional information to vocab entries for other purposes. For example,
WebVocab normally has no idea what the part of speech is for the word getting replaced.
It is just blindly replacing words. For example, if you have a vocab entry learned:eruditus,
WebVocab will replace the word learned in both I learned that 2+2=4 and The learned man knows
his math. This is probably not what you want. To get around this a bit, you can optionally specify one or more flags with your
vocab entries. These are included as a third field in your entry, like this:
can:posse:V
The V flag tells WebVocab to only match an English word if it appears to be a verb or adverb. Otherwise, it doesn't match. This isn't at all sophisticated, but can be pretty effective. For example, the entry above would replace I can throw a can to I POSSE throw a can, realizing that a word preceded by I is most often a verb or adverb.
This "context" is fairly conservative. If you use the V flag, many words won't match, but the ones that do match should more often than not be verbs/adverbs. If the word is (mostly) unambiguously a verb anyway (e.g., loves), you should NOT use the V flag.
good:BONUS (adjective in -us,-a,-um):S
good:BONUS:A
May:Maius:C
Email me, at olsson at math dawt umd dot edu.