WORDPLAY(6)

✨ WORDPLAY(6) ✨

okay bestie, sit DOWN, because we're talking about wordplay β€” the anagram finder from the Commands corner of the manual, and honestly? it's giving main character energy. πŸ’…


πŸŽ€ NAME πŸŽ€

wordplay β€” an anagram finder 🌈


πŸ¦‹ SYNOPSIS πŸ¦‹

wordplay string [-silFxavnmd] [-w word] [-f wordfile]

πŸ’– DESCRIPTION πŸ’–

So like, wordplay is an anagram finder. But what even is an anagram? Bestie, let's let Merriam-Webster's Collegiate Dictionary, Tenth Edition spill the tea:

anagram: a word or phrase made by transposing the letters of another word or phrase.

Periodt. And the rule is: each letter in the anagram must appear with the same frequency as in the original string. No borrowing letters, no doubling up, no cap. 🫢

Example time: the letters in the word "stop" can be rearranged to spell "tops" or "pots" or "sotp". But "sotp" is not a word, and nobody is interested in that when we're generating anagrams. "stop" has four letters, so there are 24 ways to rearrange its letters. Unfortunately very few of those rearrangements actually spell words. πŸ’€

So wordplay, by using a list of words, takes a specified string of letters and uses that list to find anagrams of the string. Slay. ✨

Also by the way? "Wordplay" anagrams to "Rowdy Pal", and the program really can live up to that particular anagram. The author has been able to come up with anagrams of most of his coworkers' names that are humorous, descriptive, satirical, or, occasionally, quite vulgar. πŸ™ˆ


πŸ‘‘ OPTIONS πŸ‘‘

  • string β€” the string to be anagrammed. It should be seen by the program as a single argument. If you feel like you simply must put spaces in the string, under UNIX you'll have to put backslashes in front of the spaces, or just wrap the whole entire string in double quotes. Honestly though? Just leave the spaces out, because the program throws them out anyway. πŸ—‘οΈ
  • -s β€” Silent operation. If this option is used, the header and line numbers are not printed. Super useful when you want the output to contain only the anagrams. Use this with the l (and x) option to generate a wordlist that can be piped or redirected. Note: this option does not suppress error messages printed to stderr. And finding zero anagrams is not an error, bestie, it's just a vibe. 🌸
  • -i β€” Allow the input string to appear in the list of anagrams. If this option is omitted, the input will not be counted as an anagram. πŸ€·β™€οΈ
  • -l β€” Print the list of candidate words before anagramming. This is the list of words that can be spelled with the letters from the specified string, with no letters being used more often than they appear in the input string. πŸ’–
  • -F β€” Uses /usr/share/dict/words as the wordlist instead of words721.txt. πŸ¦‹
  • -x β€” Do not perform anagramming. Use it with l if you just want the candidate word list without anagrams. πŸŽ€
  • -a β€” Allow anagrams containing two or more occurrences of a word. πŸ‘―
  • -v β€” Consider strings with no vowels as candidate words, and do not give up when there are no vowels remaining after extractions. 🧚
  • -m β€” Limit candidate word length to a maximum number of letters. Follow it by an integer. So m12 means limit words to 12 letters, and m5 means limit them to 5 letters. πŸ“
  • -n β€” Limit candidate word length to a minimum number of letters. Follow it by an integer. n2 means limit words to 2 letters, and n11 means limit them to 11 letters. πŸ“
  • -d β€” Limit the number of words in anagrams to a maximum number. Follow it by an integer. d3 means no anagrams should contain more than 3 words, and d12 means limit anagrams to 12 words. This is currently the option the author recommends to limit output, since an optimization has been added to speed execution in some cases when this option is used. πŸ”₯
  • -w β€” Specify a word which should appear in all anagrams. Handy if you already have a word in mind that you want in the anagrams. This option should be specified at the end of the command, followed by a space and the word to use. πŸ’­
  • -f β€” Specify which word list to use. See the examples, bestie! This option should be specified at the end of the command, followed by a space and the alternate wordfile name. Useful if you have other word lists to try, or if you're interested in making your own customized word list. New feature: use a hyphen as the filename if the wordlist should be read from stdin. 🌈

🌟 EXAMPLES 🌟

  • wordplay persiangulf Anagram the string "persiangulf" .
  • wordplay anagramming -lx Print the list of words from the wordlist that can be spelled by using the letters from the word "anagramming". A letter may not be used more often than the number of times it occurs in the word "anagramming". No anagrams are generated.
  • wordplay tomservocrow -n3m8 Anagram the string "tomservocrow" . Do not use words shorter than 3 letters or longer than 8 letters.
  • wordplay persiangulf -ld3m10 -f /usr/share/dict/words Print the candidate words for the string "persiangulf". Print anagrams containing up to 3 words, without considering any words longer than 10 characters. Use the file "/usr/share/dict/words" rather than "words721.txt".
  • wordplay soylentgreen -n3w stolen -f w2 Print anagrams of "soylentgreen" containing the word "stolen" and use the file "w2" as the wordlist file. Discard candidate words shorter than 3 characters.
  • wordplay university -slx Print the candidate word list for the string "university". The output will consist of just the words. This output is more useful for redirecting to a file or for piping to another program.
  • wordplay trymeout -s Anagram the string "trymeout" and print the anagrams with no line numbers. The header will not be printed. This is useful for piping the output to another process (or saving it to a file to be used by another program) without having to parse the output to remove the numbers and header.
  • wordplay trymeout -v Anagram "trymeout" as usual, but in case vowel-free strings are in the wordlist, consider them as possible candidate words.
  • cat wordlist1 wordlist2 wordlist3 | sort -u | wordplay trymeout -f - Anagram "trymeout" and read the wordlist from stdin, so that, in this case, the three wordlists "wordlist1", "wordlist2", and "wordlist3" will be concatenated and piped into wordplay as the wordlist. The "sort -u" is there to remove duplicate words from the combined wordlist.

πŸ’… NOTES πŸ’…

If the option specifiers are combined, as in "an7m7d5f" or "d3n5f", the f should come last, followed by a space and the word list file.

The "w" option is used in the same manner.

Limit the number of words to consider, if desired, using the n and m options, or better yet, use the d option to limit depth when anagramming certain time-consuming strings. The program is currently optimized to speed execution in some cases when the d option is used. ⚑

It is highly recommended that the "words721.txt" file distributed with the program be used, since many nonsense two and three-letter combinations that are not words have been eliminated. This makes the quality of the output slightly better and speeds execution of the program a slight bit. Any word list may be used, as long as there is one word per line. Feel free to create your own custom word list and use it instead. The word list does not have to be sorted in any particular way. πŸ“

🌸 FILES 🌸

  • /usr/share/games/wordplay/words721.txt β€” Default word list file. 🏠

🧚 DISTRIBUTION 🧚

This program was written for fun and is free. Distribute it as you please, but please distribute the entire package, with the original words721.txt and the readme file. If you modify the code, please mention my name in it as the original author. Please send me a copy of improvements you make, because I may include them in a future version. 🫢


πŸ’œ AUTHOR πŸ’œ

Wordplay was written by Evans A Criswell <criswell@cs.uah.edu>

This man page was written by Joey Hess <joeyh@debian.org>


and that's the whole thing, bestie β€” this page is dated DECEMBER 1996 and lives in section WORDPLAY(6) of the manual. no cap, it ate. πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from