使用本规则包可以根据商品标题自动分类; 规则包是机器学习后保存的规则文件;
python 样例脚本:
print("Load test data...")
test_data = gen_train_data(filename)
print("Start accuaracy...")
f = open('test1.pickle', 'rb')
classifier = pickle.load(f)
f.close()
for d in test_data:
print(d[0],classifier.classify(d[0]))
1