W-shingling algorithm realization in erlang