Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
def create_seq(text):
length = 30
sequences = list()
for i in range(length, len(text)):
# select sequence of tokens
seq = text[i-length:i+1]
# store
print('Total Sequences: %d' % len(sequences))
return sequences
# create sequences
sequences = create_seq(data_new)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment