(text, char_ngram=5)
| 24 | # This function is adapted from: |
| 25 | # https://github.com/mattilyra/LSH/blob/master/examples/Introduction.ipynb |
| 26 | def shingles(text, char_ngram=5): |
| 27 | return set(text[head:head + char_ngram] |
| 28 | for head in range(0, len(text) - char_ngram)) |
| 29 | |
| 30 | |
| 31 | # This function is adapted from: |