Answers for "how to get character n-grams of words"

0

how to get character n-grams of words

In [10]: n=4
In [11]: b = "student"

In [12]: [b[i:i+n] for i in range(len(b)-n+1)]
Out[12]: ['stud', 'tude', 'uden', 'dent']
Posted by: Guest on September-02-2020

Code answers related to "how to get character n-grams of words"

Browse Popular Code Answers by Language