fasttext使用

步骤

数据格式:__label__美容 最 新 款 美 容 黑 科 技

训练:./fasttext supervised -input training_set.txt -output model  -lr 1.0 -epoch 25 -wordNgrams 3

测试:./fasttext test model.bin data/test_set.txt

./fasttext predict-prob model.bin test_set.txt 2 ,返回top2的类别及其概率值

参考:

https://github.com/facebookresearch/fastText/blob/master/docs/supervised-tutorial.md

猜你喜欢

转载自blog.csdn.net/sinat_34080511/article/details/87544246