Awesome
StatNLP-PyTorch (V0.1)
The PyTorch version of StatNLP implementation V0.1. Please also make sure you understand the fundamental knowledge of the framework as well as the Java framework.
Requirements and Installation
The project is based on PyTorch 0.4+ and Python 3.5+.
We plan to upload our framework to Pypi where you can use the framework by simply typing pip install
. But at the moment, what you can do is:
git clone https://github.com/leodotnet/statnlp-neural
Build your neural graphical model under this code base, this also allows you to modify the code to adjust your own project.
Implementation Tutorials
Get your hands dirty with StatNLP! If you are not familiar with the fundamental theory of StatNLP, check out our EMNLP 2017 tutorial on structured prediction.
The code for the complete implementation tutorial is under examples/linear_ner/
.
Follow the tutorials below to build your model.
- Basics: load data into instances
- Graphical Model: build customized graphical model
- Neural Network: design neural network
- Run the model!
Examples
We have built some existing models with this framework for your references:
- Linear CRF for Named Entity Recognition
- Semi-Markov CRF for NP Chunking
- CNN for Text Classification
- Constituency Parsing CRF Model
- Download the evaluation file (for parsing) and put it under project folder.
Contributing
Coming soon
Contact
Please email to Li Hao and Allan for suggestions and comments.
License
GNU general public