News for hackers. Stuff that matters.
Re:Show HN: Python package and CLI to generate stylistic wor... by bquinlan on Friday November 08, 2019 @08:55PM (#21489014)
I created word cloud as a Valentine's Day gift this year:

- https://raw.githubusercontent.com/brianquinlan/word-cloud-va...

- https://github.com/brianquinlan/word-cloud-valentine/blob/ma...

My implementation (https://github.com/brianquinlan/word-cloud-valentine) is a lot less sophisticated than stylecloud but I think that I had a few interesting ideas about text extraction.

I used nltk to extract only nouns and to do word stemming (e.g. so that "time", "times" and "timing" are only counted as one word).

I also experimented a lot with various method of determining word size i.e. size proportional to frequency, size proportional to log(frequency), size proportional to sqrt(frequency).

Re:Show HN: Python package and CLI to generate stylistic wor... by cjauvin on Friday November 08, 2019 @11:32PM (#21489632)
It's funny, I did exactly the same, with my Hangouts Takeout extract, a couple of weeks ago, but didn't go as far, because I kept struggling with stopwords and some ways to filter out uninteresting stuff (my implementation was much more naive than yours). I'm still thinking about what other types of analysis I could perform on that interesting dataset though (because it's so personal after all).
Re:Show HN: Python package and CLI to generate stylistic wor... by amrrs on Friday November 08, 2019 @04:03PM (#21486722)
Super awesome. I just tried Obama's inaugural speech as Linkedin Icon - https://github.com/amrrs/stylecloud-demo/blob/master/obama_s... It came out very well!
Re:Show HN: Python package and CLI to generate stylistic wor... by danso on Friday November 08, 2019 @02:11PM (#21485637)
This is a great tool! Ironically, I might use it someday to illustrate why word clouds are an absurd format. But it'll be great for joking around too :)
Re:Show HN: Python package and CLI to generate stylistic wor... by meej on Friday November 08, 2019 @05:20PM (#21487516)
I wrote a paper about word clouds for my Information Retrieval class when I was in Library School, when word clouds were still a trendy and popular content browsing UI.

I concluded that they do have some utility as "semantic cartograms" in certain contexts, but beyond that they're mostly just decoration. Especially the ones created by this tool. =)

Re:Show HN: Python package and CLI to generate stylistic wor... by paultopia on Friday November 08, 2019 @01:27PM (#21485178)
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?

Re:Show HN: Python package and CLI to generate stylistic wor... by dwyerm on Friday November 08, 2019 @01:56PM (#21485458)
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/

Re:Show HN: Python package and CLI to generate stylistic wor... by y42 on Saturday November 09, 2019 @04:58AM (#21490625)
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.

Re:Show HN: Python package and CLI to generate stylistic wor... by lgas on Saturday November 09, 2019 @01:05AM (#21489920)
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...
Re:Show HN: Python package and CLI to generate stylistic wor... by danso on Friday November 08, 2019 @05:10PM (#21487409)
The library used by the submitted package seems to be well-documented: https://github.com/amueller/word_cloud
Re:Show HN: Python package and CLI to generate stylistic wor... by chrisweekly on Friday November 08, 2019 @01:59PM (#21485492)
Beautiful! Thank you for creating and sharing this! :)
Re:Show HN: Python package and CLI to generate stylistic wor... by foobarbecue on Friday November 08, 2019 @01:32PM (#21485235)
Presumably this person means "stylish," not "stylistic"?
Re:Show HN: Python package and CLI to generate stylistic wor... by jedberg on Friday November 08, 2019 @04:15PM (#21486864)
Stylistic is probably the right word here: of or pertaining to style, especially to linguistic or literary style
Re:Show HN: Python package and CLI to generate stylistic wor... by foobarbecue on Friday November 08, 2019 @07:33PM (#21488526)
I know what the word means, and I don't see how it could possibly make sense here. If he doesn't mean stylish, he might mean stylized.

What could "word clouds pertaining to style" possibly mean? Maybe if you gave it a text and it spit out a cloud with things like: "using passive voice," "flowery," "strident," "long-winded," "plain."

Re:Show HN: Python package and CLI to generate stylistic wor... by klysm on Saturday November 09, 2019 @10:52PM (#21496295)
I believe word clouds are one of the most useless presentations of data that are widely used
Re:Show HN: Python package and CLI to generate stylistic wor... by calmworm on Friday November 08, 2019 @01:30PM (#21485205)
Very impressive! Well done!