def calculate_tag_cloud(num = 5)
      range = 0

      tags = active_tags.map { |tag, posts|
        [tag.to_s, range < (size = posts.size) ? range = size : size]
      }

      range = 1..range

      tags.sort!.map! { |tag, size| [tag, range.quantile(size, num)] }
    end
def calculate_tag_cloud(num = 5)
      range = 0

      tags = active_tags.map { |tag, posts|
        [tag.to_s, range < (size = posts.size) ? range = size : size]
      }

      range = 1..range

      tags.sort!.map! { |tag, size| [tag, range.quantile(size, num)] }
    end
Calculates the css class of every tag for a tag cloud. The possible
 classes are: set-1..set-5.

 [[<TAG>, <CLASS>], ...]