Python, NLP, Numpy, Scikit Learn.
0. 0. 0. 0. 1. 0. 0. 0. 1. 0. 0. 1. 0. 0. 1. 0. 0. # 1. 0. 0. 0. 1. 0. 0. 0. 0. 0. 0. 1. 0. 0. 0. 0.] print(vec1.shape) # (40,) sent2 = [word for word in word_tokenize(corpus.raw('sent2.txt'))] vec2 = encoder.one_hot_vector(sent2) print(vec2) # [0. 0. 0. 0. 1. 0. 0. 1. 0. 0. 0. 0. 1. 0. 0. 0. 1. 0.