Skip to content

andreajparker/pytorch-crf

Repository files navigation

pytorch-crf

Conditional random field in PyTorch.

https://travis-ci.org/kmkurn/pytorch-crf.svg?branch=master https://readthedocs.org/projects/pytorch-crf/badge/?version=stable https://coveralls.io/repos/github/kmkurn/pytorch-crf/badge.svg?branch=master

This package provides an implementation of conditional random field (CRF) in PyTorch. This implementation borrows mostly from AllenNLP CRF module with some modifications.

Documentation

https://pytorch-crf.readthedocs.io/

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. 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.

About

(Linear-chain) Conditional random field in PyTorch.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 98.5%
  • Other 1.5%