using tf-idf for assigning weights to tags in a problem and creating db connections for the class instance instead of individual functions and modified the normalisation factor as well
added results with the current implementation