Words based shingles algorithm