Skip to content

Instantly share code, notes, and snippets.

@aravindpai
Last active May 27, 2019 07:12
Show Gist options
  • Save aravindpai/fc9bf8bcf7df7c7c13edf354fdeb6586 to your computer and use it in GitHub Desktop.
Save aravindpai/fc9bf8bcf7df7c7c13edf354fdeb6586 to your computer and use it in GitHub Desktop.
def seq2summary(input_seq):
    newString=''
    for i in input_seq:
if((i!=0 and i!=target_word_index['start']) and i!=target_word_index['end']):
        newString=newString+reverse_target_word_index[i]+' '
    return newString
def seq2text(input_seq):
    newString=''
    for i in input_seq:
if(i!=0):
        newString=newString+reverse_source_word_index[i]+' '
    return newString
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment