Created
December 28, 2018 06:16
-
-
Save Jirayut558/79bc5fa92f5d089610888e9ee6689679 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 load_data(datafile): | |
dataX = [] | |
dataY = [] | |
data = open(datafile, "r").read().lower() | |
for i in data.split("\n\n"): | |
a = i.split("\n") | |
question = a[0] | |
answer = a[1] | |
dataX.append(question) | |
dataY.append(answer) | |
return dataX,dataY |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment