Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Create hierarchies from list of keywords -- well known algorithm?

by revdiablo (Prior)
on Feb 24, 2005 at 00:26 UTC ( #433913=perlmeditation: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    for each item in items:
        for each keyword in item.keywords:
    ...
    for each item in items:
        sort keywords by frequency
        push hierarchy{sorted keywords}, item
    
  2. or download this
      item = 1, keywords = a b c
      item = 2, keywords = b c
      item = 3, keywords = d b
    
  3. or download this
    a = 1, b = 3, c = 2, d = 1
    
  4. or download this
    b/c/2
    b/c/a/1
    b/d/3
    
  5. or download this
    my @items;
    
    ...
    }
    
    print "$_\n" for sort @nodes
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlmeditation [id://433913]
Approved by kvale
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (1)
As of 2021-10-20 01:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My first memorable Perl project was:







    Results (78 votes). Check out past polls.

    Notices?