Fixed documentation and codestyle in similarity.py