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

能不能提供一个通用Python训练代码啊 #115

Open
forever1dream opened this issue Apr 3, 2018 · 4 comments
Open

能不能提供一个通用Python训练代码啊 #115

forever1dream opened this issue Apr 3, 2018 · 4 comments

Comments

@forever1dream
Copy link

forever1dream commented Apr 3, 2018

train_cws.py 训练 输入特征:字的 word2vec向量表示
train_pos.py 训练 输入特征是:词的 word2vec向量表示,文档写的最大50个词,向量的1-50是词的word2vec表示,不够的用0填充;字的word2vec向量表示,每个词最大5个词,超过5个字的用最后一个字代替第五个字,就是一个50X5的向量;词性标注结果个词的向量长度一致50,所以训练语料是长度为350的向量,1-50是词,51-300是字,301-350是预测结果。
想写一个train NE 的代码模仿train_pos.py: 1-50词,51-300字,301-350词性,NE表示和字序列类似每个最大长度15,就是15X50,351-1100是预测结果,但是改代码失败了
能不能一个train.py, 准备好训练语料之后,自定义特征以及对应的特征长度,还有定义输出
对Python不熟悉,想用这个训练model之后C++直接调用,求大神指教。

@AlleyEli
Copy link

我这边最近在使用,所以把训练和使用模型封装了下:
https://github.com/AlleyEli/kcws 你可以看readme最上面加的部分,进行操作!

@forever1dream
Copy link
Author

forever1dream commented May 18, 2018 via email

@AlleyEli
Copy link

@forever1dream 不好意思,才发现两边同一个人 嘿嘿! 有缘

@forever1dream
Copy link
Author

@AlleyEli 哈哈 我不怎么会Python

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

2 participants