Word Galaxies are a concept originally thought up by Nate Oostendorp. You read in a bunch of text and then try to arrange the words in a crossword-like arrangement according to the whims of the pseudo-random number generator on your computer. They look very neat.
I downloaded Nate's code and modified it a little bit, but it was
written in mostly-uncommented Perl without the use of -w
or use strict;, so I had a hard time extending it for my
own purposes. At the same time, I felt that I might be able to
improve on his algorithm, so I wrote my own.
I have recently started using Python, and I think I'm a convert. Its sparse syntax combined with its modularity, object oriented-ness, and ease of learning have convinced me that there might be hope for the future: we might not be using C for everything forever! Therefore, I wrote my new galaxy generator in Python.
It generates very dense word galaxies. I think that they look pretty cool, though. You can download the code to make your own if you would like. Let me know if you do cool things with it! galaxy.py will make a galaxy out of all the whitespace separated word you pass into it on stdin. paragraphs.py will make one galaxy out of each newline-separated paragraph you pass in on stdin. grid.py is a 2-d extensible array. Sample output is below in all of the .gal and .html files.
S
o R
n e
in s
e p
tForm
Koan
s
e
u
n yb
k ol
n m W ui c
o a learn. p f o
w k f s sd I lg i c mw
undefined:t, f aug rl o po
s s n e o o Inao ea mprn
d kiAk l nra 's pred
contemplatealast Elihe
an ao hdn;c u never
ne tw eetph_n i ltan,
r h LTfehiTd bt iets
Mastereae uh g.ei
oulfavoriteph o
wby sensCrtot tn z
WnfeTedetheonewhq a
i eao F aiafdnoiu z
tparadoxnndremusi e
Thats r dgsorelet n
ho he k._ mindeed,
eu ee n". ont maya
g k SoTy rgr stol
h , whole.u muo
,eue t burn
ss h es e
hs , t
o o
w
-
T
Cort
van
c
y
Response to Koan in Sonnet Form
"The more you know, the less you understand."
So reads a favorite from the _Tao Te Ching_.
A phrase by Master Lao Tsu deftly planned
To guarantee us years of pondering.
A paradox indeed, it seems to show
Enlightenment achieved as quite a feat
For one may understand but never know
That comprehension is at last complete.
In private zazen, contemplate this koan
With wonder, stoke your inner fire's burn
The path you follow must be yours alone
If you would seek the truth, your own to learn.
We seek, though blind, the undefined: our goal;
At last to find the unknown makes us whole.
-Tracy van Cort
(c) Tracy van Cort avancort@hmc.edu
(Fuzzy and Blue on E2)
Apache/2.2.3 (Debian) mod_python/3.2.10 Python/2.4.4 PHP/4.4.4-8+etch6 mod_perl/2.0.2 Perl/v5.8.8 Server at soy.dyndns.org Port 80Name Last modified Size Description
Parent Directory -
1a.html 18-Nov-2002 23:04 7.6K
galaxy.desc 18-Nov-2002 23:04 305
galaxy.py 15-Jul-2003 20:50 2.9K
galaxy.pyc 15-Jul-2003 20:50 5.7K
galaxy.tar 18-Nov-2002 23:04 20K
galgal.html 18-Nov-2002 23:04 40K
ginsburg.html 18-Nov-2002 23:04 15K
grid.py 18-Nov-2002 23:04 936
grid.pyc 15-Jul-2003 20:39 1.9K
koan.txt 18-Nov-2002 23:04 1.0K
paragraphs.py 18-Nov-2002 23:04 566
poem.galaxy 18-Nov-2002 23:04 1.0K
poem.txt 18-Nov-2002 23:04 740