Building Tag Clouds in Perl and PHP
By Jim Bumgardner
Publisher: O'Reilly Media
Final Release Date: May 2006

Tag clouds are everywhere on the web these days. First popularized by the web sites Flickr, Technorati, and del.icio.us, these amorphous clumps of words now appear on a slew of web sites as visual evidence of their membership in the elite corps of "Web 2.0." This PDF analyzes what is and isn't a tag cloud, offers design tips for using them effectively, and then goes on to show how to collect tags and display them in the tag cloud format. Scripts are provided in Perl and PHP.

Yes, some have said tag clouds are a fad. But as you will see, tag clouds, when used properly, have real merits. More importantly, the skills you learn in making your own tag clouds enable you to make other interesting kinds of interfaces that will outlast the mercurial fads of this year or the next.

Product Details
Recommended for You
Customer Reviews

REVIEW SNAPSHOT®

by PowerReviews
oreillyBuilding Tag Clouds in Perl and PHP
 
3.5

(based on 6 reviews)

Ratings Distribution

  • 5 Stars

     

    (0)

  • 4 Stars

     

    (4)

  • 3 Stars

     

    (1)

  • 2 Stars

     

    (1)

  • 1 Stars

     

    (0)

Reviewed by 6 customers

Sort by

Displaying reviews 1-6

Back to top

 
4.0

Pretty Solid Book

By Anonymous

from Undisclosed

Comments about oreilly Building Tag Clouds in Perl and PHP:

As others have stated here, perhaps this is not groundbreaking material in terms of what is covered, but it is a very solid summary of the latest information and having that information available in one place rather than having to search all over web for it is well worth the nominal price.

(2 of 2 customers found this review helpful)

 
2.0

Disappointed

By Anonymous

from Undisclosed

Comments about oreilly Building Tag Clouds in Perl and PHP:

The only useful thing I learned from this article that I didn't find for free after just a few googles was why and how to use the log of the count to determine the font size, as opposed to the straight count. That was a handy tip, and I did use that code. But relative to the amount of fabulous info that's available for free, I don't think it was worth ten bucks.

What I wanted to learn but didn't was more about prepping the content. I wanted to create a cloud for a user forum site, showing graphically what the hot topics are in users' recent postings. I wanted some tips about trimming out uninteresting words, e.g. "I", "was", "wanted", "more", .... I was hoping to find pointers to some stock code, or at least word lists, to help me trim the content.

I also wanted tips about normalizing the content. For example: "help", "helps", "helped" and "helping" are all about "help"; "Britney" and "Britney's" are both about "Britney". I can hardcode arrays to (PHP's) str_replace to replace all verb forms with one form, but I'm not sure how to handle possessives. Again I was hoping for pointers to existing work, or at least tips on doing the normalization.

Finally, I wanted some tips about memory management and performance for good-sized textual analyses.

This article doesn't address generating the content at all; it starts by assuming you already have a pre-built list of words. It then walks you through relatively straight-forward font-sizing code that is, for the most part, freely available for the googling. IMO, that's not worth $10.

 
4.0

case insensitive bug && colors are useful

By Stolkin

from Undisclosed

Comments about oreilly Building Tag Clouds in Perl and PHP:

I noticed the code says that it treats the tags as case insenstive, e.g. the Perl code uses

uc(). However, in the example of words from Genesis there is both "And" as well as "and". So there seems to be some bug.

Also, there is an advantage to using different colors. Often a tag can be a phrase rather a single word, and often many tags will be about the same font size -- different colors help to distinguish them. But the colors should not be

truly random; the code should prevent adjacent tags from getting the same color.

 
3.0

Understanding Tag Clouds

By Jennifer Davis

from Undisclosed

Comments about oreilly Building Tag Clouds in Perl and PHP:

I am not sure that the copy I read was the finished version. I have a Safari subscription, and I read this there and it was only 38 pages and had some comments at the end that mentioned to Jim about writing the conclusion and closing paragraphs so the final product might have some differences.

That said, I found this a very interesting document. For people interested in understanding the basis of tags, and how to implement them in Perl or PHP this is a great resource.

Jim begins with delving into the definition of what a tag cloud is, weighted lists, and some other technologies that various sites use. There is a descriptive analysis of popular sites and their use of tag clouds or other technology that makes for interesting reading.

The coverage of perl vs php implementations is not balanced. With perl, Jim walks through the script example line by line so perl newbies can really understand what is happening. He describes the required dependent modules and what they do/contribute to the scripts. He doesn't do the same with the php examples. (This may be something that is fixed in the final version.)

One other part that is deficient in this document is CSS. Jim mentions CSS but doesn't really explain what it is. There is an assumption that the individual already knows. A pointer to more information would be good even if the scope of the document doesn't include CSS. It's fundamental to the concept of design in current implementations of websites, and so is highly relevant but I understand the lack of space in terms of length of the document.

I found the information about human functions and the math that graphs these functions and how to manipulate the resultant curves to something that shows interesting results _very_ interesting. It is the first time I have been exposed to these concepts.

Overall this is a great resource for those who are interested in building more knowledge about this much used technology of Web 2.0 sites. Resources like these really make the library subscription to Safari very worth it.

 
4.0

Build Tag Clouds in Perl and PHP Review

By Frederick J Eccher Jr

from Undisclosed

Comments about oreilly Building Tag Clouds in Perl and PHP:

Quoted from an O'Reilly email to me on Thu Jun 1 12:10:59 2006.

"Build Tag Clouds in Perl and PHP by Jim Bumgardner

First popularized by the web sites Flickr, Technorati, and del.icio.us, these amorphous clumps of words now appear on a slew of web sites as visual evidence of their membership in the elite corps of "Web 2.0." This PDF analyzes what is and isn't a tag cloud, offers design tips for using them effectively, and then shows how to collect tags and display them in the tag cloud format. Scripts are provided in Perl and PHP. ISBN: 0-596-52794-2, 46 pages, $9.99 US, $12.99 CAN http://www.oreilly.com/catalog/tagclouds/ "

Everything is true in the quote above. A number of the learning issues end up being explained in a series of historical contexts. I think it is important to develop knowledge and logic based on a few of the historical twists and turns. Some of the most important lessons learned in this book are the ones that let you know this is a fad and we need to learn it as a fad that might go out of style in a hurry if we do not find good use[s] for tag clouds, the 'real merits' Mr. Bumgardner writes about in this PDF.



My experience agreed with everything Mr. Bumgardner wrote. I question the real merit of using a copy that is stored "of the word as it first appears" [pg 19]. Since there will be a link to the word, what happens when the word has more than one meaning: bow, bow, bow wow? Are there three links? Does the user go to one link thinking the word meant something else? If a tag cloud is a weighted list, then having one spelling with more than one meaning might throw the 'real merits' of the tag cloud off or at least cloud the user experience.

Some of the topics covered include the introduction to tag clouds as a possible fad, lists that are weighted, a brief history, some tips for designing and building, and then two sets of identical examples in PERL and PHP before the conclusion. Design Tips is probably the best chapter starting on page 13. The rest of the book needs to be clearly understood before you get to Making Tag Clouds [either one or both of the examples]. The chapters are written clearly, if briefly. I like that about this book. No long winded explanations of useless trivia here. Get to the point and stay there with good, clear code.

I thought the discriminations made between two examples were all straightforward and well defined without going overboard. Get the right tool for the job, not the only tool you know. This is very valuable knowledge worth your time to read.

The book is in PDF format. I like that feature. You can buy this online through the O'Reilly shopping cart and then download it.

The 45+ pages were easy to read and understand. I read it in one evening. The book is for someone who is a beginner but more experienced people should look it over to make sure they are up to speed with an expert.

I would give this book 4 out of 5 stars. I recommend this book for everyone starting with beginners and moving through the rest of the ranks of experience. Since it is such a quick and easy read, you might be missing something unless you check your knowledge against this expert.

Frederick J Eccher Jr June 27, 2006

MBA

M.S. Management of Information Systems

A.B. Psychology

B.A. Biology

President, Board of Directors, Saint Louis Visual Basic Users Group

 
4.0

Short Review of Tag Clouds PDF

By George Woolley of Oakland.pm & Camelot.pm

from Undisclosed

Comments about oreilly Building Tag Clouds in Perl and PHP:

Do you like to keep up with recent innovations on the web? Have you heard about or seen "tag clouds" and want to learn more about them? Do you know what tag clouds are and want to implement them?

If your answer is yes to any of the questions above, I recommend reading this PDF.

If you want more detail, you could read my somewhat longer review on the Oakland Perl Mongers site.

Displaying reviews 1-6

Back to top

 
Buy 2 Get 1 Free Free Shipping Guarantee
Buying Options
Immediate Access - Go Digital what's this?
Ebook: $9.99
Formats:  DAISY, ePub, Mobi, PDF