Dictionary Lookup is a Chrome extension that allows you to quickly look up definitions of words and phrases in a clean inline box. The definitions come from Wiktionary, but have been preprocessed to reduce formatting and provide faster lookup. Hold Alt and double-click or select any word to look it up - an inline box will open to the dictionary entry of that word, usually including examples, audio pronunciation and synonyms.
The application is powered by three separate parts:
The extension itself, located in the extension
subfolder, does not require
building - it can be loaded or packed into a CRX by Chrome as is.
The lookup server script, located in the lookup_server
subfolder, does not
require building either. However, it expects the lookup database built by the
Wiktionary parser to be accessible - the database settings can be edited at the
top of the file (the $MYSQL_*
variables).
The Wiktionary parser is a little more complicated. Here's a step-by-step guide to running the whole thing:
wiktionary_setup/build-mediawiki.sh
to create a MediaWiki installation
with the ExpandTemplates and ParserFunctions extensions and the additions
needed by the Wiktionary parser. This is a dummy server that is only used to
expand Wiktionary templates. You may need to edit the database settings in
wiktionary_setup/build-mediawiki.sh
before running the script. Note that
this script requires the following commands to be available:
wget
: for getting the MediaWiki source tarball. tar
: for unpacking the source tarball.patch
: for applying parser-specific patches.svn
: for getting the required mediawiki extensions.mysql
: for creating the databases (mysqld must be running).mediawiki/LocalSettings.php
to set the database connection details
($wgDB*
) and the URL path from which the mediawiki folder is served
($wgScriptPath
).wiktionary/__main__.py
.wiktionary/__main__.py
. This should execute the whole pipeline.LOOKUP_DB
(as specified in wiktionary/__main__.py
).