Last active
July 28, 2020 07:09
-
-
Save prateekjoshi565/a31747636959ae0ef2c328e4ec749e09 to your computer and use it in GitHub Desktop.
This file contains 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 get_integer_seq(seq): | |
return [token2int[w] for w in seq.split()] | |
# convert text sequences to integer sequences | |
x_int = [get_integer_seq(i) for i in x] | |
y_int = [get_integer_seq(i) for i in y] | |
# convert lists to numpy arrays | |
x_int = np.array(x_int) | |
y_int = np.array(y_int) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment