Web Analytics Made Easy -
StatCounter how are related categories generated? - CodingForum

Announcement

Collapse
No announcement yet.

how are related categories generated?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • how are related categories generated?

    Say that I have a database. When the user searches for Dog, I want them to view the results and also find a link to a pre-existing page on the site about Dogs.

    Of course, there are many pre-existing pages under different subjects.

    What is the general way of generating related categories from a search query?

    My theory is that it works in the 1 to n direction. You break the words in the query into separate pieces. Then, you search the words against a MySQL database of all related words for different categories. Finally, you generate the best related category based on the most matches.

    Is this how it is typically done?

  • #2
    i don't understand your explanation or goal at all. what exactly are you trying to do?

    there are many different categorisation algorithems and there are also a lott of different ways to measure the proximity between keywords and categorys / keywords and keywords / categorys and categorys.
    what would never work, is to compute such proximity on the fly --> it will always be precomputed to deliver some acceptable performance.

    i've got the feeling that you actually just want to index your pages (--> getting all keywords out of the and storing them in a db) and that you then want to do a keyword search...
    Posting guidelines I use to see if I will spend time to answer your question : http://www.catb.org/~esr/faqs/smart-questions.html

    Comment


    • #3
      My question is say that a person enters in a search field that he wants to search on the web for Something.

      On the left side would be the search results for Something on the web. On the right side, wherever possible, would be a local page on the site about that topic if its available.

      Say on Amazon.com, you search for digital camera in the searchbox. It would answer with all the search results for the digital cameras but on the top, it would say, please visit our Camera & Photo category.

      Comment


      • #4
        really this would be a database question and you should have the thread moved there (either mysql or the general database forum).

        you would set up your tables according to the type of method you want to use to search.

        My pal Rudy has a good article on adjacency list model as well as a link to a Joe Celko article on using nested sets. he also links to one other article on the modified tree traversal method.

        until you understand how one of those breaks down and how to implement your data structure as well as traverse the tree using one of those methods, I don't think you should go any further. you may end up with a convoluted method of storing/retrieving your data that would be too resource intense as your data expands. trust me I've seen it in action, it isn't pretty!

        Comment

        Working...
        X