← Open Source

(Linear-chain) Conditional random field in PyTorch.

Model DevelopmentDomain-specific trainingPython
Momentum
+0stars in 24 hours0.0%
978
Stars
153
Forks
+0
This week
7
Contributors
Created 2017-11-25 · Updated 2026-11-10 · #15370 today
Top developers
kmkurnleejuyuuaravindMahadevan
README

pytorch-crf

Conditional random field in PyTorch.

This package provides an implementation of linear-chain 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.

Nearby in the ranking
Similar items

AI Rank for iPhone

Follow AI model rankings

Download on the App Store