def METHOD_NAME(char):
    char_list = char.strip().split()
    yield char_list
    char_encoded = char_encoder.encode_sequence_torch(char_list)
    char_encoded_bos = char_encoder.prepend_bos_index(char_encoded).long()
    yield char_encoded_bos
    char_encoded_eos = char_encoder.append_eos_index(char_encoded).long()
    yield char_encoded_eos