Git Product home page Git Product logo

pytorch-nlp's Introduction

pytorch-nlp

1 word embedding

python run.py

2 named entity recognition

2.1 Train the model

python train.py

3 machine translation

3.1 Preprocess the data

python preprocess.py -train_src data/nmt/src-train.txt -train_tgt data/nmt/tgt-train.txt -valid_src data/nmt/src-val.txt
 -valid_tgt data/nmt/tgt-val.txt -save_data data/nmt/demo

3.2 Train the model

python train.py -data data/nmt/demo -save_model demo-model

3.3 Translate

python translate.py -model demo-model_epochX_PPL.pt -src data/nmt/src-test.txt -output pred.txt -replace_unk -verbose

4 chatbot

4.1 Train the model

python main.py -tr pytorch-nlp/data/chatbot/train_little.txt -sd pytorch-nlp/data/chatbot/save 

4.2 Test the model

python main.py -te pytorch-nlp/data/chatbot/model/model.tar \
-c pytorch-nlp/data/chatbot/train_little.txt \
-sd pytorch-nlp/data/chatbot/save

5 speech recognition

5.1 Train the model

python train.py --train-manifest data/train_manifest.csv --val-manifest data/val_manifest.csv

5.2 Testing/Inference

python test.py --model-path models/deepspeech.pth.tar --test-manifest /path/to/test_manifest.csv

reference

https://github.com/OpenNMT/OpenNMT-py

https://github.com/ywk991112/pytorch-chatbot

https://github.com/SeanNaren/deepspeech.pytorch

pytorch-nlp's People

Contributors

endymecy avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.