Created
February 8, 2019 21:24
-
-
Save HarshSingh16/271dee9967095197ad056ff2d276ded8 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
#Conveting questions and answers into sequence of integers | |
questions_int_sequence=[] | |
for question in Clean_questions: | |
int=[] | |
for word in question.split(): | |
if word not in dict_word2integer: | |
int.append("<OUT>") | |
else: | |
int.append(dict_word2integer[word]) | |
questions_int_sequence.append(int) | |
answers_int_sequence=[] | |
for answer in new_clean_answers: | |
int=[] | |
for word in answer.split(): | |
if word not in dict_word2integer: | |
int.append("<OUT>") | |
else: | |
int.append(dict_word2integer[word]) | |
answers_int_sequence.append(int) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment