The code should take text from standard input:
The definition of insanity is quoting the same phrase again and again and not expect despair.
The output should be a PNG file containing the word cloud corresponding to that text:
The above word cloud was created using a specialized online application and it filtered the word The
and other common words (of
, is
, and
, not
, and the
). Since this is code golf, the common words will not be filtered and I leave secondary aesthetics of the word cloud to the choice of each coder. Unlike the image exampled here, no words should be excluded, common or otherwise. The definition of a word is defined below.
In this case a word is anything alpha-numeric; numbers are not acting as separators. So, for example, 0xAF
qualifies as a word. Separators will be anything that is not alpha-numeric, including .
(dot) and -
(hyphen). Thus i.e.
or pick-me-up
would result in 2 or 3 words, respectively. Should be case sensitive - This
and this
would be two different words, '
would also be separator so wouldn
and t
will be 2 different words from wouldn't
.
The tags should appear clustered but not overlapping and the font size should be directly proportional to the number of occurrences of that word in the text. The word should appear only once. Specific font color is not required in this case. Semantic association is not a requirement.
Hint - This other code golf could help: Count the words in a text and display them
of
,is
,and
,not
, andthe
. \$\endgroup\$