Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

source_vocab.txt和target_vocab.txt文件 #56

Open
Kiiver opened this issue Sep 17, 2018 · 10 comments
Open

source_vocab.txt和target_vocab.txt文件 #56

Kiiver opened this issue Sep 17, 2018 · 10 comments

Comments

@Kiiver
Copy link

Kiiver commented Sep 17, 2018

请问source_vocab.txt和target_vocab.txt文件长什么样,有样例吗?比如与source.txt文件相对应的文件

另外wiki.zh.vec词向量是在哪下载的呢?可以用自己根据source.txt文件得到的词向量替代吗?

@zbxzc35
Copy link

zbxzc35 commented Nov 3, 2018

修改config.py的action为train,运行rnn.py,可以得到source_vocab.txt和target_vocab.txt,wiki词向量可以参考这个自己训练https://blog.csdn.net/weixin_40400177/article/details/79366065

@SuooL
Copy link

SuooL commented Nov 8, 2018

修改了之后还是报错 IOError: [Errno 2] No such file or directory: 'resource/target_vocab.txt'

@hudianyong
Copy link

你好,我也遇到这个问题了,一致没解决,请问你解决了吗?

@Foehnc
Copy link

Foehnc commented Dec 21, 2018

@zbxzc35 你好 请问能详细说一下怎么改吗

@juebanchengzi
Copy link

我想問一下你這個問題解決沒有?方便告知一下吧,謝謝

@pipipuppypaul
Copy link

修改了之后还是报错 IOError: [Errno 2] No such file or directory: 'resource/target_vocab.txt'

可能是python版本不一样导致的编译顺序不同。owner是p2,虽然先import了utils,但是似乎只会在调用get_class_size() 和 target_vocab.txt时才会去寻找需要的文件。而p3似乎在开始时就要准备齐全文件。
不对的话当我没说。

@zdx1012
Copy link

zdx1012 commented Jun 5, 2019

2楼正解,感谢

@nwf5d
Copy link

nwf5d commented Jun 11, 2019

source_vocab.txt和target_vocab.txt都是用utils.py中build_word_index方法生成的。如果用的Python3,需要单独先运行utils.py

@SeekPoint
Copy link

还是不行啊@nwf5d

@Yolky-1996
Copy link

修改config.py里word_embedding_file的存放路径为你自己wiki.zh.vec的存放路径

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests