feat(snippet):changed queryterms to map
We don't want to later calculate the frequency everytime for query.Doing it when we set the queryterms
feat(snippet): Implement cosine similarity also.

Implemented the cosine similarity code.
There is some issues with the code.
In test cases, we are facing the issue rm_collection_size = 0

Moreover query probability is not able to be updated. need to debug with good set probably with omega integration.

omega has an issue with update with arguments.