49

image Tutorial 49: Dictionary Lookups via Dict.org

This is how you can request the dictionary entry for a keyword using the curl utility and some shell commands to clean up the resulting response from the dict.org server.

#!/bin/sh SEARCH_KEY=$1 curl -i -s “dict://dict.org/d:${SEARCH_KEY}:” | grep -v “^150”| grep -v “^2”| grep -v “^$”| sed ‘s/^151 //’

The DICT: protocol is described in RFC 2229. Many other resources are available at the Dict Org web site.

Add tools to the user interface you provide to your journalists so that they can access this useful resource too.

Dictionary Org web site: http://www.dict.org/

Get Developing Quality Metadata now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.