This SO had helped me solve a similar problem in the past.<p><a href="https://datascience.stackexchange.com/a/7000" rel="nofollow">https://datascience.stackexchange.com/a/7000</a><p><a href="https://www.kaggle.com/c/facebook-recruiting-iii-keyword-extraction/forums/t/6650/share-your-approach" rel="nofollow">https://www.kaggle.com/c/facebook-recruiting-iii-keyword-ext...</a>
Here is a brief overview of what you need to do:<p>1. Use nltk to get all the nouns etc. from the topic.<p>2. You can use LDA/TF-IDF (gensim) for your questions to extract the most common topic.<p>3. Use cosine similarity once you have the corpus built to tag a question to the right category.<p>Look into gensim for more details for the topic modeling.