I am trying to automatically generate categories for search queries. For e.g 'iphone 5 not working' should yield something like 'technology', 'mobile phone', 'troubleshooting'. These categories are to be automatically generated. Is there some open dataset that one can query to do this mapping? I am completely clueless. Any pointers will be greatly appreciated.