XiaoxiongSUN
XiaoxiongSUN
@lili1234567890 这个是输入的测试文件,你可以随便创建一个文件,里面是待测试的query
https://github.com/forever1dream/cplus-kcws 完整测试 可以看这个
~/work/tensorflow/word2vec-master/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 这是词向量模型啊
Alley 于2018年5月16日 周三10:13写道: > 我这边最近在使用,所以把训练和使用模型封装了下: > https://github.com/AlleyEli/kcws 你可以看readme最上面加的部分,进行操作! > > — > You are receiving this because you authored the thread. > Reply to this email directly, view it on...
@AlleyEli 哈哈 我不怎么会Python
@changfengfeng 对Python不熟悉啊,我就是参考了train_pos.py这个文件,一直没改对,加了一列特征之后,总报错: def inference(self, wX, cX, pX, reuse=None, trainMode=True): word_vectors = tf.nn.embedding_lookup(self.words, wX) char_vectors = tf.nn.embedding_lookup(self.chars, cX) pos_vectors = tf.nn.embedding_lookup(self.poss, pX) char_vectors = tf.reshape(char_vectors, [-1, FLAGS.max_sentence_len, FLAGS.max_chars_per_word, FLAGS.embedding_char_size]) char_vectors =...
项目使用的是bazel编译,比较麻烦,修改一下seg_backend_api.cc 这个文件,如下: /* * Copyright 2016- 2018 Koth. All Rights Reserved. * ===================================================================================== * Filename: seg_backend_api.cc * Author: Koth * Create Time: 2016-11-20 20:43:26 * Description: * */ #include #include...
@AlleyEli 我是觉得用bazel编译比较麻烦,而且集成到自己的项目中比较麻烦,上面的方法主要是弄清楚解码所需要的依赖 -I是依赖的头文件,-L是所需的.a或者.so 可以直接根据这个些makefile或者其他的,修改的代码主要是将源码中的网络服务去掉,改成,本地输入测试,或者文件测试  
Alley 于2018年5月16日 周三10:39写道: > @forever1dream 能告诉下训练和使用时候环境吗? > 我的Ubuntu16.04 + python2.7 + bzel0.45 + tf1.7.0 > 我对比下 > > — > You are receiving this because you were mentioned. > >...
@AlleyEli 我把整个编译过程也放到github(https://github.com/forever1dream/cplus-kcws) 修改下自己的tensorflow安装路径(把该项目和tensorflow安装路径放在同级目录,就可以了) 和 boost路径,就可以运行了。感谢你的Python训练方法,我再去看看,多谢啦。