Get Similarity Score Between Two Columns of Data

#1
Hi,

I've been aimlessly trawling the forums for a solution to what I suspect is a rather simple problem. I have two columns of data:

Term | Paper i | Paper j
---------------------------
man | 2 | 0 |
park | 6 | 1 |
cat | 4 | 3 |
did | 0 | 15 |
----------------------------

I need to compare paper j against paper i to give an overall value of similarity. This should take into account the number of terms and the frequency of each term.

All help will be gratefully received.

Thanks,

Dan

p.s. sorry for the poorly denoted table