public interface WordSizer
WordCram.withSizer(WordSizer).
Some useful implementations are available in Sizers.
float sizeFor(Word word, int wordRank, int wordCount)
Word be rendered?
Generally, a word cloud draws more important words bigger. Two typical ways to measure word's importance are its weight, and its rank (its position in the list of words, sorted by weight).
Given that, sizeFor is passed the Word (which knows its own weight), its rank, and the total number of words.
For example, given the text "I think I can I think", the words would look like this:
word - the Word to determine the size ofwordRank - the rank of the WordwordCount - the total number of Words being rendered