Conditional random field in PyTorch
Project description
pytorch-crf
Conditional random field in PyTorch.
This package provides an implementation of conditional random field (CRF) in PyTorch. This implementation borrows mostly from AllenNLP CRF module with some modifications.
Documentation
License
MIT
Contributing
Contributions are welcome! Please follow these instructions to install dependencies and running the tests and linter.
Installing dependencies
Make sure you setup a virtual environment with Python and PyTorch installed. Then, install all the dependencies in requirements.txt file and install this package in development mode.
pip install -r requirements.txt pip install -e .
Setup pre-commit hook
Simply run:
ln -s ../../pre-commit.sh .git/hooks/pre-commit
Running tests
Run pytest in the project root directory.
Running linter
Run flake8 in the project root directory. This will also run mypy, thanks to flake8-mypy package.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for pytorch_crf-0.7.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1b2d7d5eea3255f6e0cac09ab8b645472e76ff70d9333bc88762cf7317a4992d |
|
MD5 | 9151ae3f2e855ff0821f76c52f8ce145 |
|
BLAKE2b-256 | 967d4c4688e26ea015fc118a0327e5726e6596836abce9182d3738be8ec2e32a |