Skip to Content

Word Cloud in Scratch?

« How do I...?
2 replies [Last post]
John Faig
Member

I am relatively new to Scratch and don't know all of the ways it can be used.  I was wondering if it can be used to create a Word Cloud, similar to Wordle.net (link)

The process would be:

1.  get list of words

2.  count occurances of each word

3.  draw text horizontally or vertically with font proportional to number of occurances

3a.  make sure that text does not overlap

Thanks for any advice!

Replies
Chalk Marrow
Member

John:

 

That is a very interesting idea for a project! I've been thinking about doing something like that for a while, but never completed it.

In any event, this project attempts to handle the display part, given frequency data:
http://scratch.mit.edu/projects/chalkmarrow/660750

I didn't incorporate the counting and sorting functionality into this project, though I'm hoping some enterprising Scratcher will do so in a remix :)

 

- Dan

Karen Brennan
Member

What an interesting and challenging question! My instinct is that you could do it with Scratch, but it might not be too easy. I wrote a little parser that shows how you could build a list from a collection of words provided as keyboard input. You could then create another list to count duplicates.

As for drawing the word cloud, the only thing I can think of off the top of my head is that you'd either use the pen to draw letters or you could have a sprite (or costume) for each letter. You'd build up words by stamping sprites on the stage - like Jay does in this project.

I hope that helps. When I was just getting started with Scratch, I found the Scratch website really helpful. I looked at lots of different projects and downloaded the projects to see how they were made --  it gave me a better understanding of what you can do with Scratch.

Thanks,

K