Skip to main content

Conditional random field in PyTorch

Project description

pytorch-crf

Conditional random field in PyTorch.

https://badge.fury.io/py/pytorch-crf.svg https://travis-ci.org/kmkurn/pytorch-crf.svg?branch=master https://coveralls.io/repos/github/kmkurn/pytorch-crf/badge.svg?branch=master https://cdn.rawgit.com/syl20bnr/spacemacs/442d025779da2f62fc86c2082703697714db6514/assets/spacemacs-badge.svg

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytorch-crf-0.7.2.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

pytorch_crf-0.7.2-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

Details for the file pytorch-crf-0.7.2.tar.gz.

File metadata

  • Download URL: pytorch-crf-0.7.2.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/28.8.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.4

File hashes

Hashes for pytorch-crf-0.7.2.tar.gz
Algorithm Hash digest
SHA256 e6456e22ccfc99a3d4fe1e03e996103b1b39e9830bf3c7e12e7a9077d3be866d
MD5 c69b5b9ff6fe52cc06da30333a101259
BLAKE2b-256 e28caa58618f8c9cc8b2ddd22d4e700028101ec331d4c65c8cca663844a9dc24

See more details on using hashes here.

File details

Details for the file pytorch_crf-0.7.2-py3-none-any.whl.

File metadata

  • Download URL: pytorch_crf-0.7.2-py3-none-any.whl
  • Upload date:
  • Size: 9.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/28.8.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.4

File hashes

Hashes for pytorch_crf-0.7.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1b2d7d5eea3255f6e0cac09ab8b645472e76ff70d9333bc88762cf7317a4992d
MD5 9151ae3f2e855ff0821f76c52f8ce145
BLAKE2b-256 967d4c4688e26ea015fc118a0327e5726e6596836abce9182d3738be8ec2e32a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page