Skip to content

Instantly share code, notes, and snippets.

@aravindpai aravindpai/int2text.py
Last active May 27, 2019

Embed
What would you like to do?
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
You can’t perform that action at this time.