Skip to content

Instantly share code, notes, and snippets.

@HarshSingh16
Created February 14, 2019 09:26
Show Gist options
  • Save HarshSingh16/26763fc3a89567d85f2be5702b555a86 to your computer and use it in GitHub Desktop.
Save HarshSingh16/26763fc3a89567d85f2be5702b555a86 to your computer and use it in GitHub Desktop.
# Creating a list of all of the conversations
conversations_ids = []
for conversation in conversations[:-1]:
_conversation = conversation.split(' +++$+++ ')[-1][1:-1].replace("'", "").replace(" ", "")
conversations_ids.append(_conversation.split(','))
# Getting separately the questions and the answers
questions = []
answers = []
for conversation in conversations_ids:
for i in range(len(conversation) - 1):
questions.append(id2line[conversation[i]])
answers.append(id2line[conversation[i+1]])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment