This is a simple PHP script used by a web service that I host at xlufz.ratnakar.org/xlufz.php for use in the Exet crossword construction web app.
The web service allows highlighting words (such as synonyms of something) on selected web pages. For example:
- Cryptic container indicators that "mean like" glass:
- All published cryptic indicators related to the topic of climate:
- Abbreviations of words that can be described by the adjective blue:
- Anagram indicators that often precede the word drink:
As can be seen from the examples above, you pass the URL of the web page
as a URLEncoded parameter named srcurl
. All other parameters
that you pass are used for word selection in the Datamuse words API.
Only a small set of web pages can be processed by Xlufz. You can easily modify the code to change this set and run your own instance of Xlufz. This set currently consists of the following URL roots:
cryptics.georgeho.org
www.crosswordunclued.com
www.highlightpress.com.au
en.wikipedia.org
longair.net
Xlufz uses the excellent and versatile Datamuse words API. Please refer to its documentation to see how you can modify the word selection parameters to highlight words that have a certain letter pattern, or rhyme with something, etc.
You can serve the index.html
file as a simple frontend to the
service, if you want to use it directly instead of using it through
Exet.