Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6097525
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T13:03:15+00:00 2026-05-23T13:03:15+00:00

I have tags on my website, and I input them one by one when

  • 0

I have tags on my website, and I input them one by one when I create a blog post. I love gmail’s new feature, that ask you if you want to include X in a mail, if you type Y’s name and that you often include both of them in the same messages.

I’d like to do something similar on my website, but I don’t know how to represent the tags “related-ness” in an object or database … thoughts ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T13:03:16+00:00Added an answer on May 23, 2026 at 1:03 pm

    It all boils down to create associations between certain characteristics of your posts and certain tags, and then – when you press the “publish” button – to analyse the new post and propose all tags matched with your post characteristics.

    This can be done in several ways from a “totally hard-coded” association to some sort of “learning AI”… and everything in-between.

    Hard-coded solutions

    This are the simplest algorithms to implement. You should first decide what characteristics of your post are relevant for tagging (e.g.: it’s length if you tag them “short” or “long”, the presence of photos or videos if you tag them “multimedia-content”, etc…). The most obvious is however to focus on which words are used in posts. For example you could build a mapping like this:

    tag_hint_words = {'code-development' : ['programming', 
                                            'language', 'python', 'function', 
                                            'object', 'method'],
                      'family' : ['Theresa', 'kids', 
                                  'uncle Ben', 'holidays']}
    

    Then you would check your post for the presence of the words in the list (the code between [ and ] ) and propose the tag (the word before :) as a possible candidate.

    A common approach is to give “scores”, or in other word to put a number that indicates the probability a given tag is the right one. For example: if your post would contain the sentence…

    After months of programming, we finally left for the summer holidays at uncle Ben’s cottage. Theresa and the kids were ecstatic!

    …despite the presence of the word “programming” the program should indicate family as the most likely tag to use, as there are many more words hinting.

    Learning AI’s

    One of the obvious limitations of the above method is that – say one day you pick up java beside python – you would probably need to change your code and include words like “java” or “oracle” too. The same applies if you create new tags.

    To circumvent this limitation (and have some fun!!) you could try to implement a learning algorithm. Learning algorithms are those who refine their outcome the more you use them (so they indeed… learn!). Some algorithm requires initial training (many spam filters and voice recognition programs need this initial “primer”). Some don’t.

    I am absolutely no expert on the subject, but two common AI’s are: the Naive Bayes Classifier and some flavour of Neural network.

    Although the WP pages might look scary, they are surprisingly easy to implement (at least in Python). Here’s the recording of a lecture at PyCon 2009 on the subject “Easy AI with Python“. I found it very informative and even somehow inspiring! 🙂

    HTH!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

On my website I have tags that people can use to post on my
I'm making a website with specific posts that have tags created by the user.
On my website I have a variable called $user_data that contains input from a
I have a photo website and i want to support tags as my original
Well I have a videos website and a few of its tables are: tags
i have a database table of website links. i have another table of tags,
On a blog detail page, I have a tags section. The html looks like:
In building my responsive website I have come across a bug that appears only
I am using contentEditable div tags on my website and I have noticed a
I have a custom jQuery script that works fine in all bowsers but one

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.