ANAGRAMS is a shareware program that generates anagrams for any word or phrase you give it. ANAGRAMS is a DOS program but it runs under Windows as well.
You can download either of the following files:
This archive contains the following files:
ANAGRAMS.EXE is the main executable file, ANAGRAMS.TXT is this documentation file, and *.CMP are the dictionary files.
NEW: I've recently released the ANAGRAMS source code (as well as source code to other programs) under the GNU GPL.
An anagram is a word or phrase made by rearranging all the letters in another word or phrase. For example, an anagram for SUBMARINE is SEMIURBAN.
Here are anagrams for other phrases:
|Saddam Hussein||He damns Saudis|
|Charles Manson||Slasher con man|
|Marilyn Monroe||Merrily moan on|
|David Letterman||Dead mitral vent|
|Mary Jo Kopechne||My joke chaperon|
|Benito Mussolini||So, I bout Leninism|
|Lee Harvey Oswald||Oe, why ever Dallas?|
|Elvis Aron Presley||Very loin pleasers|
|Ronald Wilson Reagan||Orwellian radon snag|
|Richard Milhous Nixon||Nix Hanoi child rumors|
|John Fitzgerald Kennedy||Jerk thy fond Nazi legend|
|George Herbert Walker Bush||Heartbroke Hebrew slugger|
|Jacqueline Lee Bouvier Onassis||Bees join sequoia surveillance|
ANAGRAMS is a program that anagrammizes any phrase you give it. The anagrams it generates are made up of words in ANAGRAMS's dictionary.
I got the idea to write ANAGRAMS after having seen Neil J. Rubenking's NAMEGRAM program. ANAGRAMS was written in its entirety by Kim Moser, using Borland's Turbo C 2.0. (The latest version was compiled with Microsoft Visual C++ 1.5.) Neither ANAGRAMS's source code nor its algorithms were derived from any other programs.
Two versions of ANAGRAMS are available: the "unregistered" version and the "registered" version. The dictionary supplied with the unregistered version of ANAGRAMS contains words up to 6 letters long.
The registered version of ANAGRAMS has a larger dictionary (with words up to 27 letters long), and has the ability to find "interesting" anagrams (i.e. anagrams which contain at least one "interesting" word).
Given a phrase (usually someone's name), ANAGRAMS reads all the candidate words from its dictionary. A candidate word is one whose letters are all in the phrase you want to anagrammize. For example, if you're anagrammizing COMPUTER, then CUTE is one of the candidate words. COOP is not a candidate word, though, because it contains two O's, whereas COMPUTER contains only one.
ANAGRAMS then checks all combinations of the candidate words it just read, and displays those combinations whose letters make up an anagram of the phrase you're anagrammizing.
Because anagrams which contain at least one long word are usually more interesting than those which contain only short words, ANAGRAMS first looks for anagrams which contain the longest candidate words, then progresses to anagrams which contain only shorter candidate words.
When it finds an anagram, ANAGRAMS displays the candidate words which make up the anagram. The longest candidate words will be displayed first, and the shortest will be displayed last. Words that are the same length are displayed in alphabetical order. For example, an anagram for KIM MOSER is ROM SKI ME. Note that the three-letter words are displayed before the two-letter words, and the two three-letter words (ROM and SKI) are displayed in alphabetical order.
It's up to you to rearrange the words within an anagram to find meaningful phrases. For example, an anagram for JOHN FITZGERALD KENNEDY is TOKING JENNY HARD FED LEZ. This makes more sense when rearranged into HARD-TOKING JENNY, LEZ FED. (Okay, it makes only marginally more sense, but you get the idea.)
Invoke ANAGRAMS from the DOS command line as follows:
ANAGRAMS [-option ...] <phrase>
<phrase> must contain only alpha characters ('A' through 'Z'), which may be upper- or lowercase. Spaces (' ') are not allowed.
The following command line options may be used:
|-b<wrd>||Begin with word <wrd> (useful for restarting)|
|-c||Show just the candidate words (no anagrams) (note: only the registered version of ANAGRAMS supports this option)|
|-d||Disallow duplicate words in an anagram|
|-e||Echo anagrams to stderr, too|
|-i||find only interesting anagrams (note: only the registered version of ANAGRAMS supports this option)|
|-r||Tell ANAGRAMS not to create a range table.|
|-s<n>||Set status level to <n> (0=off, 1=outermost word, 2=% done, 3=# out)|
|-m<min>||Minimum word length = <min>|
|-a<max>||Maximum word length = <max>|
|-w<min>||Find anagrams which contain at least <min> words|
|-x<max>||Find anagrams which contain at most <max> words|
|-fi||Flag interesting anagrams (note: only the registered version of ANAGRAMS supports this option)|
|-fw<min>||Flag anagrams which contain at least <min> words|
|-fw<max>||Flag anagrams which contain at most <max> words|
|-pn<nnn>||Format output into <nnn> columns|
|-pw<nnn>||Columns will be <nnn> characters wide|
|-pp<nnn>||Page is <nnn> characters wide|
ANAGRAMS's options are case-insensitive; you may specify them in either upper- or lowercase.
Here are some examples:
If you ever have to stop ANAGRAMS in the middle of anagrammizing a phrase, you can use the -B option to restart ANAGRAMS where it left off. You must specify the candidate word that ANAGRAMS was up to when it was stopped. For example, if you stopped ANAGRAMS in the middle of finding anagrams for InternationalBusinessMachines, and the candidate word it was up to was SENSATIONALISTS, then you can restart it like this:
ANAGRAMS -bSENSATIONALISTS InternationalBusinessMachines
The candidate word may be specified in either upper- or lowercase. If the word which you specify is not a candidate word, ANAGRAMS will start with the first (longest) candidate word.
You'll probably want to restart ANAGRAMS with all the other command line options that you were using previously, but you don't have to.
Only the registered version of ANAGRAMS supports the -C option. The -C option causes ANAGRAMS to show just the candidate words; anagrams are not generated. Candidate words are shown longest to shortest.
Use the -D option to prevent ANAGRAMS from finding anagrams which contain duplicate words. For example, if you're anagrammizing the phrase BE NO BONE, the -D option will prevent the anagram NOON BE BE from being found because the word BE is duplicated. Likewise, BONE BONE won't be found, either.
Note that if the phrase you're anagrammizing has no duplicate letters, then ANAGRAMS will automatically invoke the -D option for you, since it knows that none of the anagrams will contain any duplicate words. Also, invoking the -D option speeds up ANAGRAMS's calculations a bit.
ANAGRAMS WHATEVER >OUT.TXT
This will create the file OUT.TXT, which will contain the anagrams for WHATEVER. When ANAGRAMS is working, though, you won't be able to see the anagrams it comes up with, because they're being redirected to a file.
The -E option tells ANAGRAMS to send the anagrams to stderr (always the screen) as well. This lets you see anagrams as they're generated, even if ANAGRAMS's output is redirected to a file.
While ANAGRAMS is running, you can press the 'E' key to turn the -E option on and off. (See below for more information on valid keystrokes while ANAGRAMS is running.)
Only the registered version of ANAGRAMS supports the -I option. The -I option causes ANAGRAMS to display only "interesting" anagrams.
An "interesting" anagram is one which contains at least one "interesting" word. An "interesting" word is one which I marked as "interesting" when I created ANAGRAMS's dictionary. Most of the "interesting" words are related to politics, religion, or sex.
The -R option tells ANAGRAMS not to create a range table. Normally ANAGRAMS creates a range table in memory to speed up its calculations, but when the phrase to be anagrammized is long it can take an inordinate amount of time to create the range table. In such cases, it's most efficient to use this option to tell ANAGRAMS not create a range table.
Use the -S option to set the status level.
|0||The status is shut off completely. (If the -S option is not specified, this is the default status level).|
|1||ANAGRAMS shows the outermost candidate word that it's up to.|
|2||ANAGRAMS shows everything that it does in level 1, as well as how many candidate words it has checked, how many remain to be checked, and what percentage it's done.|
|3||ANAGRAMS shows everything that it does in level 1 and 2, as well as how many anagrams it has found so far.|
As it checks each candidate word, ANAGRAMS will display the current status. The more candidate words that were read in, the longer it will take for ANAGRAMS to display the status.
Note that while ANAGRAMS is running, you can press '?' to see the current status. Hitting '?' causes ANAGRAMS to show you everything that you would see if the status level was set to 3.
Use the -M option to tell ANAGRAMS the minimum candidate word length that it should use. For example, if you want to see anagrams which contain only words that are at least 4 characters long, invoke ANAGRAMS as follows:
ANAGRAMS -m4 WHATEVER
Of course, the minimum word length you specify must be no longer than the phrase for which you want to find anagrams. For example:
ANAGRAMS -m8 TEST
is not allowed because TEST contains only 4 characters; the longest candidate word, therefore, won't be longer than 4 characters, so limiting it to 8 characters is meaningless. Also:
ANAGRAMS -m5 KimMoser
is not allowed because no combination of 5-letter words (or longer) can generate an anagram which contains 8 letters.
The -A option is similar to the -M option, but is used to tell ANAGRAMS the maximum candidate word length that it should use. For example, if you want to see anagrams which contain words that are at most 4 characters long, invoke ANAGRAMS as follows:
ANAGRAMS -a4 WHATEVER
Of course, if the maximum candidate word length that you specify is longer than the phrase you're anagrammizing, ANAGRAMS will ignore the maximum word length that you requested.
When using both the -M and the -A options, the minimum candidate word length that you specify must be less than or equal to the maximum candidate word length that you specify. For example:
ANAGRAMS -m3 -a4 WHATEVER
is acceptable, but:
ANAGRAMS -m4 -a3 WHATEVER
Use the -W option to tell ANAGRAMS the minimum number of words an anagram must contain for it to be displayed. If you don't use the -W option, all anagrams are displayed, regardless of how few words they contain.
Use the -X option to tell ANAGRAMS the maximum number of words an anagram may contain for it to be displayed. If you don't use the -X option, all anagrams are displayed, regardless of how many words they contain.
If you use both the -W and the -X option, then the number that you specify with the -W option must be no larger than the number you specify with the -X option. For example,
ANAGRAMS -w2 -x3 KimMoser
means "display all anagrams which contain at least 2 and at most 3 words," which is acceptable. But,
anagrams -w3 -x2 KimMoser
means "display all anagrams which contain at least 3 and at most 2 words," which is not acceptable.
Only the registered version of ANAGRAMS supports the -FI option. This option causes ANAGRAMS to flag "interesting" anagrams with asterisks ('*').
At the end of each "interesting" anagram, an asterisk will be printed for every "interesting" word in the anagram. The more interesting words the anagram contains, the more asterisks will be printed.
Use the -FW option to specify the minimum number of candidate words an anagram must contain for it to be marked. If an anagram contains at least that many words, it will be marked with plus signs ("+").
See the description of the -FX option for more information on how anagrams are marked.
Use the -FX option to specify the maximum number of candidate words an anagram may contain for it to be marked. If an anagram contains no more than that number of words, it will be marked with plus signs ("+").
For each word in the anagram being marked, a plus sign will be printed at the end of the anagram. A three-word anagram, for example, will be marked with "+++" (three plus signs).
If neither the -FW nor the -FX option is used, no anagrams will be marked with plus signs.
Use the -PN option to specify how many columns the anagrams (or candidate words, if you used the -C option) should be printed into.
Based on the length of the phrase you're anagrammizing, ANAGRAMS will make its best guess as to how wide the columns should be so that the longest anagram (or candidate word, if you used the -C option) will fit.
Use the -PW option to specify how wide the columns will be.
Use the -PP option to specify the width of each "page." Based on the length of the phrase you're anagrammizing (or the longest candidate word), ANAGRAMS will calculate the number of columns and the width of the columns for you.
Of course, you can override ANAGRAMS by specify either the number of columns (with the -PN option) or the column width (with the -PW option).
The -PN, -PW, and -PP options work together like this:
For example, if you specified a page width of 80 characters, and a column width of 12 characters, ANAGRAMS will set the number of columns to 6.
Likewise, if you specified a page width of 80 characters, and the number of columns at 5, ANAGRAMS will set the column width at 16 characters.
Note that when ANAGRAMS has to calculate the column width, it can only make an educated guess. This is because it hasn't yet generated any anagrams, so it doesn't know how wide the longest anagram will be.
While ANAGRAMS is finding anagrams, it accepts the following keystrokes:
|Q||Quits ANAGRAMS, returning you to DOS|
|N||Skip to next leading candidate word|
|E||Toggle -E option (echo anagrams to screen)|
|S||Change the status level|
If you hit any other key, ANAGRAMS will display the list of valid keys.
Hitting 'Q' will stop ANAGRAMS, returning you to DOS.
Hitting 'N' stops ANAGRAMS from looking for anagrams which begin with the candidate word that it's up to, and causes it to look for anagrams which start with the next candidate word. Think of this as the "fast forward" key. It will cause you to miss some potential anagrams, but it lets you jump quickly to the next candidate word.
Hitting 'E' will toggle the -E option: if the -E option is on, it will be turned off; if it is off, it will be turned on. If you've redirected ANAGRAMS's output to a file, you can use the -E option to take a peek at the anagrams that are being generated.
Hitting 'P' pauses ANAGRAMS and writes a message telling you to hit any key to continue.
Hitting 'S' causes ANAGRAMS to change the status to the next highest level (or to 0 if the status level is already set to 3).
Hitting '?' shows you which candidate words are being worked on, how many candidate words were read in, how many candidate words have been checked, what percentage is done, and how many anagrams have been found so far. This is exactly what you see when the -S option was used to set the status level to 3.
Note that ANAGRAMS checks for and processes keystrokes only AFTER it finds a candidate word that fits in the anagram that it's checking. This usually happens dozens of times a second, so your keystrokes are usually acted on almost immediately.
Sometimes, though, it will take ANAGRAMS a long time to find the next word that fits in the anagram. This usually happens when you're anagrammizing a particularly long phrase, or one which contains very few (or no) duplicate letters. When this happens, your keystrokes will be ignored until ANAGRAMS finds the next word that fits.
When ANAGRAMS doesn't respond to your keystrokes, you can either wait patiently for it to respond, or you can hit Ctrl-C (or Ctrl-Break) to stop it and return to DOS.
Undoubtedly you'll want to use ANAGRAMS to anagrammize the names of your relatives, friends, and enemies. You'll find that some names yield a few hundred anagrams, some yield a few thousand, and others yield a few million. As you'd expect, long names generally yield more anagrams than do shorter names.
But nobody wants to pick through the millions of anagrams for John Fitzgerald Kennedy, just to find a juicy one like JOHN LED NAZIFY KEG TREND. Here are some suggestions to cut down on the number of anagrams that ANAGRAMS generates:
Note that using the -A option to limit the maximum candidate word length usually isn't as effective as using the -M option. Using the -A option also cuts down on the number of anagrams which contain long words; these anagrams are often the most interesting.
You can use ANAGRAMS to help unscramble words. For example, if you're given the scrambled word MELCARBS, you can find which words its letters can be rearranged into. Invoke ANAGRAMS as follows:
ANAGRAMS -m8 MELCARBS
The -m8 option will cause ANAGRAMS to use only candidate words that are at least 8 characters long. But because MELCARBS is exactly 8 characters long, only candidate words that are exactly 8 characters long will be considered. Anagrams will print the words CLAMBERS and SCRAMBLE.
If ANAGRAMS takes an inordinate amount of time to create the range table, try using the -R option.
Under certain circumstances, ANAGRAMS writes the following messages:
- ANAGRAMS XXXX
- ANAGRAMS -m5 ABCDEFGHI
Some of the words in ANAGRAMS's dictionary were provided by Public Brand Software. PBS's licensing agreement is as follows:
This collection of words has been provided by and is copyrighted by Public Brand Software, P.O. Box 51315, Indianapolis IN 46251. We reserve all rights to this collection. You, having bought it from Public Brand Software or received it from any other source are permitted, by license, to give this collection to anyone else as long as it is intact with this document file and that Public Brand Software is given credit for the compilation both in any documentation and in any advertising.
A further license to use, distribute, and sell this collection of words either intact or as a derivative work is granted if you send a copy of the finished product to Public Brand Software at the above address and if Public Brand Software is given credit for the compilation both in any documentation and in any advertising.
We will respect your copyrights of any finished product sent under the above conditions, but we do encourage you to put your finished product into the Public Domain or make it available for User Supported distribution.
In accordance with their licensing agreement, a registered version of ANAGRAMS has been sent to PBS.
04/14/1991: Version 1.2: First public release.
05/10/1991: Version 1.3: Added ability to change -E and -S options on the fly; added -FW and -FX options to shareware version; made shareware version work on phrases of unlimited length, but with maximum candidate word length of 6 letters; replaced -R option with -I and -FI in registered version.
05/13/1991: Version 1.4: Added recap which summarizes options selected; added -C option to registered version.
10/03/1991: Version 1.5: Added -PN, -PW, and -PP options for formatting output; added check in main anagrams() function to speed up processing when anagram being checked contains too many words.
06/19/1996: Version 1.5.2: Recompiled with Microsoft Visual C++ 1.5, created WWW page, converted documentation from WordPerfect to MS Word.
03/11/1997: Version 1.6: Added -r option to bypass use of range table, thus speeding up computation. (This option is useful when the phrase to be anagrammized is particularly long, in which case computing the range table takes a long time.)
ANAGRAMS is provided "as is," and the author does not guarantee its performance. By using ANAGRAMS, you agree to not only bear all responsibilities for its actions, but also to hold the author of ANAGRAMS free of responsibilities for the performance of ANAGRAMS. In other words, the author is not responsible for what you do with ANAGRAMS, even if the program doesn't do what you expected.
Although ANAGRAMS is a copyrighted program, you may give the SHAREWARE version to your friends (and enemies) provided you neither alter it in any way nor accept payment for it.
The REGISTERED version of ANAGRAMS may NOT be duplicated without the author's permission.
If you find ANAGRAMS useful and/or amusing, please send $5.00 to the author. Doing so will provide me with the incentive to continue to upgrade the program.
For a REGISTERED version of ANAGRAMS, please send $10.00. This will get you a version of ANAGRAMS with:
I have spent quite a bit of time making ANAGRAMS easy to use, and donations of any amount are welcome. You can donate via Paypal by clicking on the "Donate" button below:
Whether you donate or not, feel free to drop me an email to let me know if you found ANAGRAMS useful or entertaining.
Copyright © 2020 by Kim Moser (email)
Last modified: Tue 07 September 2010 05:55:50