added posterior to linalg.py. sim_top_doc now accepts posteior probability as a similarity measure