By Bumgardner J.
Tag clouds are far and wide on the net nowadays. First popularized through the internet websites Flickr, Technorati, and del.icio.us, those amorphous clumps of phrases now look on a slew of sites as visible facts in their club within the elite corps of "Web 2.0. This PDF analyzes what's and is not a tag cloud, bargains layout information for utilizing them successfully, after which is going directly to express find out how to acquire tags and show them within the tag cloud structure. Scripts are supplied in Perl and PHP.Yes, a few have stated tag clouds are a fad. yet as you'll discover, tag clouds, while used appropriately, have actual benefits. extra importantly, the abilities you research in making your personal tag clouds allow you to make different fascinating varieties of interfaces that would out live the mercurial fads of this 12 months or the following.
Read Online or Download Building Tag Clouds in Perl and PHP PDF
Similar programming: programming languages books
For the reason that its unlock no longer really 3 years in the past, C# has speedily won vast utilization. This ebook is written for C# 2. zero, protecting all of the new positive factors in 2. zero, together with generics. as well as its assurance of C#, it additionally presents details at the . internet Framework and periods that C# interacts with. each bankruptcy contains questions and solutions in addition to steered tasks.
* the first publication at the J2ME Polish open resource device * Written by means of Robert Virkus, the lead programmer and architect of J2ME Polish * Discusses each point of J2ME Polish in-depth, together with fitting, utilizing, and lengthening * contains hands-on tutorials that inspire the reader to use their got wisdom
- Scea Sun Certified Enterprise Architect for Java Ee Study Guide (Exam 310-051)
- Java Performance
- Mastering Visual Basic .NET. Bonus: Transact SQL
- fleurs en perles de rocaille
- Bijoux Couture: Bijoux textiles, perles et matières
Extra info for Building Tag Clouds in Perl and PHP
Php Note: Figures 19 thru 28 (in the PHP section) exactly duplicate Figures 9 thru 18 (in thePerl section). I did this to keep illustrations inline with the text, so that PHPprogrammers don't have to keep flipping back to the Perl section. As you can see, the words in Figure 19 are far too small. We probably don't wantto see a font size smaller than about te so let's add ten to the count. We'llchange the line that converts tag count to font size from this: $fsize = $cnt; 39 40 to this: $fsize = $cnt+10; This change produces the tag cloud shown in Figure 20.
But tobegin with, we do need some raw data, so the scripts that count the tags will useweb sites that provide data we can use to build tag clouds. 1. Collecting Tags When developing a general-purpose script, it's a good idea to work with at leasttwo very different sets of data so you can get a better idea of what kinds ofchallenges you might encounter. I am providing scripts that retrieve data from twovery different sourcesone very old and one very new. Both scripts collect thedata and save the data to a global associative array called $tags.
Power curvesare a very common phenomenon found in popularity or frequency data collectedfrom human activity. Figure 23. A power curve There tends to be a very few large values in the data, and lots and lots of small values. The problem with mapping a power curv to a limited set of font sizes is that the "long tail" of the power curve ends up getting represented by just one or two font sizes. Many of the intermediate font sizes won't get used at all because of the larger gaps between the counts of the most popular word The way to make this tag cloud look better is to use a logarithmic function to reverse the power curve's effects.