Anagramski

Anagramski extracts all anagrams of a given word from a file

What is an anagram?

An anagram is a word (or phrase) that can be constructed by rearranging all characters of another word (or phrase). For example "Axel" is an anagram of "Alex" as well as "Jim Morrison" is one of "Mr Mojo Risin" (and vice versa).

Read the correspoding Wikipedia article for more information.

Usage example

alex@ekorn:~ > ./anagramski -h
usage: ./anagramski -w WORD -f FILE

The following command extracts all anagrams of "loop" from the Webster's Second International Dictionary:

alex@ekorn:~ > ./anagramski -w loop -f /usr/share/dict/web2
polo
pool

Limitations and advantages

Anagramski doesn't handle phrases at all, only tokens ("words") are used for anagram computation.

However, computation of anagrams is quiete fast: Even on one of my oldest machines (a Pentium 233Mhz), extracting all anagrams of a word from Webster's Second International Dictionary is finished in about one second and memory consumption is minimal.

Downloading Anagramski

Source anagramski.c
Static FreeBSD Binary anagramski-FreeBSD-static.bz2
Static Linux Binary anagramski-Linux-static.bz2
Win32 Binary anagramski-Win32.exe.zip

Compiling Anagramski

Anagramski is written in ANSI C and has no special library dependencies. All you need to compile Anagramski is a C compiler like GCC or lcc-win32.

In case you use gcc, run a command like the following one to compile Anagramski:

gcc -Wall -ansi -pedantic -o anagramski anagramski.c

Related links