One-hot編碼

import numpy as np samples = ['The cat sat on the mat.', 'The dog ate my homework.'] token_index = {} for sample in samples: # 在這裏使用split()方法,在中文中須要分詞 for word in sample.split(): if w
相關文章
相關標籤/搜索