more changes for similarity function

This modified the parameters for similarity. Also this adds the function
into banter.js.