Hacker News new | past | comments | ask | show | jobs | submit login

That looks really cool!

A while ago I tried to write some wordcloud code, but couldn't quite figure out how to do the layout. Does anyone know where one might find a good writeup of the algorithm that tends to be used for this?




You might look through the source code for Wordcram[1]. It is built under Processing, and is relatively easy to understand, I think.

[1] http://wordcram.org/


I once wrote a pretty simply and straight forward algorithm to create a WordCloud in VBA for PowerPoint:

https://www.nickyreinert.de/wordcloud-in-powerpoint/

It does not cover white-space with words, as Wordle et al will do. Also it's in German. But I guess the code itself is quite clear.


This stackoverflow answer from the creator of Wordle links to a free chapter from a book that describes the way Wordle does it: https://stackoverflow.com/questions/342687/algorithm-to-impl...


The library used by the submitted package seems to be well-documented: https://github.com/amueller/word_cloud




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: