Last active
April 28, 2017 16:43
-
-
Save mkolod/1512a8032d03d8a0fdc0b8baa2f027a1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def find_ngrams(input_list, max_n): | |
| return [map(lambda x: list(x), zip(*[input_list[i:] for i in range(n)])) for n in range(1, max_n+1)] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.