Crossword Utilities: A PD Package Announcement
    By Timothy Swenson

This past summer my wife, Catherine, decided to take up solving
the "Bonus" crossword puzzle published in the local paper.  She
tried the New York Times puzzle, but it turned out to be harder
than she liked.  To help her solve the puzzle, she starting
typing in past crossword clues and answers into Archive.  She
then sorted them and printed them out and used them to solve the
future puzzles.  She started to nice that "Bonus" reused the same
clues over and over, making the puzzle easier and easier to
solve.  Soon she has over 4,600 entries in the database.

Once she built a fairly big database, I realized that this
database might be usefull to other QL users that solve crossword
puzzles.  I started to think what else would be usefull to solve
crossword puzzles.

I like to solve them by trying to fill in as many answers as I
can and then use these answers to help with the other words.  I
find myself constantly saying something like, "What is a 3 letter
word for _____ that ends with D."  Having a book like "20,000
Words" or a dictionary is usefull, only if you know what the word
starts with.  I wanted a way to search a dictionary without
knowing the beginning of the word.  First, I had to create a
dictionary.  Using the answers stored in the "Bonus" crossword
database, I added the /usr/dict/words dictionary file available
on most Unix systems.  After some massaging, I had the dictionary
I needed.  The dictionary file has about 25,000 words.

Next came the search engine to work on the database.  I started
thinking about how I would write a search engine, when I realized
that one, this is going to be harder than I thought, and second,
why reinvent the wheel.  A version of 'grep' had ben ported over
to the QL and came with the C68 distribution.  Grep is a
pattern-matching program from Unix that is very usefull for
searching large files for occurances of a word or phrase.  Grep
is not easy to use, so I decided to come up with a SuperBasic
program to work as a front-end to grep, plus I figured out how to
get grep to search for words of a certain length.  Searching the
database is as simple of this:

   "What 5 letters words have the 2nd letter as R and end in T."
You would use the string ".R..T" in the search.  Use use periods
(.) as unknown letters.  

Searching the Archive database of clues can be done using the
Archive commands SEARCH and FIND.  Refer to your Archive manual
for the details on these commands.

Now that all of this is complete, I am making the database,
dictionary file, grep, and the front-end programs available as a
Public Domain distribution as the file Xword_zip.  Look for it on
a BBS server or Internet FTP server near you.

    Source: geocities.com/siliconvalley/pines/5865

               ( geocities.com/siliconvalley/pines)                   ( geocities.com/siliconvalley)