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
相关文章
相关标签/搜索