1 Star 1 Fork 1

lduml/nlp-tutorial

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

nlp-tutorial

nlp-tutorial is a tutorial for who is studying NLP(Natural Language Processing) using TensorFlow and Pytorch. Most of the models in NLP were implemented with less than 100 lines of code.(except comments or blank lines)

Curriculum - (Example Purpose)

1. Basic Embedding Model

2. CNN(Convolutional Neural Network)

3. RNN(Recurrent Neural Network)

4. Attention Mechanism

5. Model based on Transformer

Model Example Framework Lines(torch/tensor)
NNLM Predict Next Word Torch, Tensor 67/83
Word2Vec(Softmax) Embedding Words and Show Graph Torch, Tensor 77/94
TextCNN Sentence Classification Torch, Tensor 94/99
TextRNN Predict Next Step Torch, Tensor 70/88
TextLSTM Autocomplete Torch, Tensor 73/78
Bi-LSTM Predict Next Word in Long Sentence Torch, Tensor 73/78
Seq2Seq Change Word Torch, Tensor 93/111
Seq2Seq with Attention Translate Torch, Tensor 108/118
Bi-LSTM with Attention Binary Sentiment Classification Torch, Tensor 92/104
Transformer Translate Torch 222/0
Greedy Decoder Transformer Translate Torch 246/0
BERT how to train Torch 242/0

Dependencies

  • Python 3.5+
  • Tensorflow 1.12.0+
  • Pytorch 0.4.1+
  • Plan to add Keras Version

Author

MIT License Copyright (c) 2019 TaeHwan Jung Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

https://github.com/graykode/nlp-tutorial 展开 收起
README
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/lduml/nlp-tutorial.git
git@gitee.com:lduml/nlp-tutorial.git
lduml
nlp-tutorial
nlp-tutorial
master

搜索帮助