代码拉取完成,页面将自动刷新
python kcws/train/prepare_pos.py /e/data/people_2014 pos_lines.txt
bazel build -c opt third_party/word2vec:word2vec
bazel-bin/third_party/word2vec/word2vec -train pos_lines.txt -min-count 5 -save-vocab pre_word_vec.txt
python kcws/train/replace_unk.py pre_word_vec.txt pos_lines.txt pos_lines_with_unk.txt
bazel-bin/third_party/word2vec/word2vec -train pos_lines_with_unk.txt -output word_vec.txt -size 150 -window 5 -sample 1e-4 -negative 5 -hs 0 -binary 0 -cbow 0 -iter 3 -min-count 5 -hs 1
python kcws/train/stats_pos.py /e/data/people_2014 pos_vocab.txt lines_withpos.txt
bazel build -c opt kcws/train:generate_pos_train
bazel-bin/kcws/train/generate_pos_train word_vec.txt char_vec.txt pos_vocab.txt /e/data/people_2014 pos_train.txt
以上char_vec.txt可使用分词中相同的文件
sort -u pos_train.txt>pos_train.u
shuf pos_train.u >pos_train.txt
head -n 230000 pos_train.txt >train.txt
tail -n 51362 pos_train.txt >test.txt
python kcws/train/train_pos.py --train_data_path train.txt --test_data_path test.txt --log_dir pos_logs --word_word2vec_path word_vec.txt --char_word2vec_path char_vec.txt
python tools/freeze_graph.py --input_graph pos_logs/graph.pbtxt --input_checkpoint pos_logs/model.ckpt --output_node_names "transitions,Reshape_9" --output_graph kcws/models/pos_model.pbtxt
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。