Computing Document Term Relevance Scores - Coding problem | OneNoughtOne