WordCram

open-source word clouds for Processing

Follow WordCram on Twitter @wordcram

Ask a Question in the Forum /wordcram

Pull Requests Welcome on GitHub danbernier/WordCram

Latest News

WordCram 1.0.0 Released, for Processing 3.0

WordCram 0.6.2 Released

WordCram 0.6.1 Released

All posts

Why Don't All My Words Show Up?

You installed WordCram, gave it a list of words, and ran it - and some of your words are missing. What’s up?

WordCram will try really hard to place all your words, but if it has a hard time placing one, it’ll eventually move on to the next word. (If it didn’t, you might still be waiting now for a WordCram you started to render a year-and-a-half ago.) Normally, this is ok, because WordCram isn’t rendering mission-critically important data - it’s for fun.

But if it’s not rendering some words that you really want to see, what can you do?

The first thing is to understand why it’s skipping your words. Paste this code into your sketch, right after yourWordCram renders:

1
2
3
4
5
6
7
8
9
10
11
12
13
 for (Word word : yourWordCram.getSkippedWords()) {
    switch (word.wasSkippedBecause()) {
    case WordSkipReason.SHAPE_WAS_TOO_SMALL:
      println(word.word + ": shape was too small");
      break;
    case WordSkipReason.WAS_OVER_MAX_NUMBER_OF_WORDS:
      println(word.word + ": was over max # of words");
      break;
    case WordSkipReason.NO_SPACE:
      println(word.word + ": no room to place it");
      break;
    }
  }

2014-10-09: Updated that code sample to reflect the new WordSkipReason enum.

Let’s look at each of these cases:

Here’s a bit more about that last case, not having enough room. Suppose your sketch only has 3 words, and you placed them all spread out, like below. WordCram should have no problem placing them where you want them to go.

spread-out

But now suppose you put them all in the same corner. On the same spot, they’ll overlap:

overlap

To fix this, WordCram nudges them around, so they’re close to where you want:

no-overlap

With only 3 words, this is pretty easy. With 30 words, it’s still easy, if they’re small enough.

But with too many words, WordCram eventually will throw up its hands and move on to the next word.

bubblegum collides!

(It’s ok, no one should eat bubblegum ice cream anyway.)

<<

>>