Shingles#

Functions for extracting different types of shingles given a text.

k_shingles(text, k)

Return all the k-shingles of the text

hashed_shingles(text, k, n)

Return all the k-shingles in the given text hashed into a bucket number in the range 0 to 2**`n` - 1

word_shingles(text, k[, stop_words])

Return the list of word k-shingles from the given text based on a given stop words.

hashed_word_shingles(text, k, n[, stop_words])

Return the list of word k-shingles from the given text based on a given stop words then hases it into a bucket with range 0 to 2**n - 1.