def _bpe_to_words(sentence, delimiter='<STR_LIT>'):
words = []<EOL>word = '<STR_LIT>'<EOL>delimiter_len = len(delimiter)<EOL>for subwords in sentence:<EOL><INDENT>if len(subwords) >= delimiter_len and subwords[-delimiter_len:] == delimiter:<EOL><INDENT>word += subwords[:-delimiter_len]<EOL><DEDENT>else:<EOL><INDENT>word += subwords<EOL>words.append(word)<EOL>word = '<STR_LIT>'<EOL><DEDENT><DEDENT>return words<EOL>
Convert a sequence of bpe words into sentence.