Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

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

by revdiablo (Prior)
on Feb 24, 2005 at 00:26 UTC ( [id://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?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (6)
As of 2024-04-26 08:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found