I add "word = str()" before use it due to "NameError: name 'word' is not defined". Now here's another mistake:
ValueError: slice index 1 of dimension 0 out of bounds. for 'Decoder/BahdanauAttention/strided_slice' (op: 'StridedSlice') with input shapes: [1], [1], [1], [1] and with computed input tensors: input[1] = <1>, input[2] = <2>, input[3] = <1>.