Working on sim_word_word and some other functions.
Optimized functions in similarity and ldagibbsviewer.