[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference noted::hackers_v1

Title:-={ H A C K E R S }=-
Notice:Write locked - see NOTED::HACKERS
Moderator:DIEHRD::MORRIS
Created:Thu Feb 20 1986
Last Modified:Mon Aug 03 1992
Last Successful Update:Fri Jun 06 1997
Number of topics:680
Total number of notes:5456

278.0. "Cheating with DECSpell?" by IOSG::PYE (Eating Corn Flakes = Serial In-ter-face) Thu Jul 31 1986 19:32

A friend of mine is entering a competition to work out the maximum number of 
words that can be made from the letters "ADEGILNRT". He has already written a 
program in 'C' (He thinks it's a programming language!) to scan his spelling 
dictionary to cheat, er I mean win, to pick out all the words. However his 
spelling dictionary is nowhere near as big as the DECSpell one.

No problem I thought, just run the same program, or preferably a BLISS version, 
against our dictionary. Unfortunately the dictionary seems to be in  a 
compressed format.

Do any of you Hackers know how to hack it??

Yours Winningly,

Graham (IOSG::) Pye.
T.RTitleUserPersonal
Name
DateLines
278.1A couple of dictionaries...LEANOV::WASSERJohn A. WasserThu Jul 31 1986 20:1911
	I have a couple of dictionaries in my account that might be
	useful.  Look in "RAINBO::DVL:[WASSER]DICT*.TXT".  The first
	dictionary (DICTIONARY.TXT I think) has a number of words
	that DECSPELL doesn't know about.  I think it tends toward
	the British spellings.  The second dictionary (DICTIONARY_2.TXT
	I think) has only 15000+ words.  Both are in plain text
	format with spaces or new-lines separating words.

			-John Wasser

278.2And Use A Real Language, Like CVAXUUM::DYERWage PeaceThu Jul 31 1986 21:113
	    Is it Huffman encoding?  If so, you can use VMS utility
	routines on it.
			<_Jym_>
278.3Huffman encoding?SANFAN::HAYESJOMicroVAX On BoardFri Aug 01 1986 03:445
    
    Care to expand on Huffman encoding?  I've often thought of writing
    a 'Jumble' solver using the DECspell dictionary ...
    
    John
278.4Ditto to request for details of .2 (.0 Author)IOSG::PYEEating Corn Flakes = Serial In-ter-faceFri Aug 01 1986 08:480
278.5grep & unixTLE::DRAVESFri Aug 01 1986 12:427
    Why not use the grep utility on unix?  If /usr/dict/words isn't
    big enough for you, you may be able to get hold of an on-line
    version of Webster's 2nd - just a listing of the words.  This used
    to be available for FTP from some arpa site.  I have a compressed
    version on tape somewhere.
    
    Rich
278.6Can't give you the list -- it's copyrightedRSTS32::COFFLERJeff CofflerFri Aug 01 1986 13:1211
    The exact format of the Houghton Mifflin dictionary (the dictionary
    used by DECspell) is proprietary to Houghton Mifflin, as is the
    exact word list in the dictionary.
    
    The DECspell dictionary isn't just a list of words.  It's a list
    of the most frequently used words, and apparently a great deal of
    research went into coming up with the list (or so they tell me).
    
    While the word lists do exist in DEC, I'm not sure you can get someone
    to release the list to you ... our CC nearly signed their life away
    for it and the associated decoding routines.
278.7Given time and long finger nails...BARAKA::LASTOVICANorm LastovicaFri Aug 01 1986 13:2913
    Given patience, you may be able to come close.  Get a hold of the
    latest WPS kit, and extract the DECspell stuff from it.  Then, start
    poking in the .OBJ's and .EXE (shareable's) with ANAL/OBJ and
    ANAL/IMAGE.  This will give you some entry points and parameter
    lists.  From there, short programs passing the parameters back and
    forth displaying them in between will help.  Note that the routines
    often return error status codes that have little or nothing to do
    with the actuall error.  The debugger is essential, and hacking
    is the only chance of doing this.
    
    It is left as an exorcise to the reader to go from here.

    P.S. It can be done...
278.8IOSG::WARWICKTrevor WarwickFri Aug 01 1986 21:3011
    Ermmmm, I've actually done this before, back in my University days.
    I wrote a little program (in C, actually) that produced all the
    permutations and combinations of the letters, and used Unix spell
    to discard the  silly ones. I got about 100 words out of 9 letters
    I think (I didn't have the CPU power available to run the 8 and
    9 letter ones though !). I didn't wi  n  though (and there were
    over 100 prizes). 
    
    
    Trev
278.9Anyone want a Scrabble Dictionary?COOKIE::KRANTZFri Aug 01 1986 21:546
    A group I used to work for typed in the entire Scrabble dictionary.
    Last time I checked, I still had access to the files.
    
    If you are interested, send me mail.
    
    	Joe (cookie::) Krantz
278.10CLT::GILBERTeager like a childSat Aug 02 1986 01:3319
There are only 986409 possible words.  This is practically doable
by 'hand'.  What you do is...

Write a program to generate all of them, by choosing and permuting
the letters.  Sort the words.  Flip through the appropriate dictionary
(the contest should say which), matching words.  This is not too bad,
since you skip the thousands of words that start with TG..., or LN...,
et cetera.

It helps if two people do this, one going through the dictionary, and
the other scanning the words (on-line!).  A program (possibly in TPU)
might help, so you can point to a letter and say: "Find the next word
that differs at this position (or left of this position)".

It may be best to 'chop out' the big obvious groups of non-words, and
then go through the smaller list a few separate times (fatigue, y'know).
On the third pass, you might notice something that is really a word
(the ING and ER endings possible with the letters will give you no end
of amusement -- is TREADLING a word? -- check the rules!).
278.11DECSpell callable interfaceNSG010::ADAMSSun Aug 03 1986 20:403
    DECSpell has a callable interface.  See the DECSpell Programmers
    Guide.  However, .-1's solution is more apt to be exhaustive, given
    that the contest official dictionary is known.
278.12Can anyone beat 3362?LATOUR::AMARTINAlan H. MartinSun Aug 10 1986 20:1413
Well, I found 2285 words by using a merged copy of the Tops-20 WORDS and
Gorin SPELL dictionaries.  I ran a program that normally finds all the
words that can be built out of a multiset of letters (usually a word, like
"extraterrestrial") without using any letter more than once.  I assumed
that 5 copies each of A, D, E, etc. would suffice to find any such word.

Bear in mind that there were probably some invalid words, like Roman
Numbers and RUNOFF commands found.  The dictionary contains 91159 words
in total.

Using a different dictionary, which has roughly 230000 words, I got
3362 matches.
				/AHM
278.13CLT::GILBERTeager like a childMon Aug 11 1986 18:281
    Does the contest allow letters to be repeated?
278.143362!! / No / Thanks!IOSG::PYEEating Corn Flakes = Serial In-ter-faceTue Aug 12 1986 12:4714
Re .10 - Good idea, this has proved very fruitful.

Re .12 - 3362 words!! - I would be very interested to see the list produced!!

Re .13 - Sorry no it doesn't allow repeats.


Thanks to everybody that has helped, the entry has now been put in, however I 
for one am certainly still interested in this discussion.

Cheers,

Graham Pye (Author of .0)
278.15Max of 858 words when no repetition allowedLATOUR::AMARTINAlan H. MartinTue Aug 12 1986 15:504
OK, sorry, I didn't realize from your problem statement that repetition
of the letters was not allowed.  With this change, I was able to find
692 and 858 words from the small and large dictionaries, respectively.
				/AHM
278.16Merely scan dictionary ONCE.REGINA::OSMANand silos to fill before I feep, and silos to fill before I feepWed Aug 13 1986 15:2232
    Given a set of contest letters, and an on-line dictionary, I suggest
    the following method for listing the set of words that can be made
    from the contest letters:
    
    Now, for each word in your dictionary, do this:

    Take a 26-integer array.  In slot "A", put the number
    of As in your contest letters, in slot "B", put the number of
    Bs etc.  (This step can be precompiled as a single MOVC3 instruction).
    
    For every letter of the current dictionary word, decrement the
    corresponding slot in the array.  If the slot becomes negative,
    that dictionary word can not be made.
    
    If you get completely through the dictionary word and no slot
    becomes negative, list that word.
    
    This method is much faster than the permutation business.  You
    only need to go through your dictionary ONCE.
    
    Actually, I've got a program that will do all of this for you.
    It's slightly inappropriately called BOGGLE.EXE on
    RAYNAL::USER$7:[OSMAN.TEST].
    
    The dictionary it reads are AZ.TXT, BZ.TXT, CZ.TXT . . . on
    [OSMAN.WORDS].  Feel free to copy these files (about 80000 words
    total).
    
    Just run it, it will ask you for letters.  When I typed in
    ADEGILNRT, it found about 518 words.
    
    /Eric
278.17That is how I got the answersLATOUR::AMARTINAlan H. MartinFri Aug 15 1986 17:3711
Re .16:

Yes, that is how the program GIDNEY::WHITE:<AMARTIN>SUBSEQ.B36 solves
the problem.  I wrote it (no later than) December, 1982, to solve the
Pizza Hut question "How many words can you make out of
``extraterrestrial''".

By the way, four of the words are "extraterrestrial", "extra",
"terrestrial" and "ET".  The last word is either Latin, or an example
of the glitches in my merged dictionary.
				/AHM