alis.feature_extraction.hashed_shingles
alis.feature_extraction.hashed_shingles#
- alis.feature_extraction.hashed_shingles(text, k, n)[source]#
Return all the k-shingles in the given text hashed into a bucket number in the range 0 to 2**`n` - 1
- Parameters
- textstr
String of text in which shingles are to be extracted
- kint
Shingle size
- nint
The number defining the bucket size 2**n - 1
- Returns
- shinglesiterable of int
An iterable of all k-shingles in the input text hashed into buckets