Similarity algorithms implemented in Erlang