python-crfsuite
Python binding for CRFsuite
What it is and what it does
python-crfsuite wraps the CRFsuite C/C++ library using Cython, providing a Python interface for conditional random field models. It is designed for sequence labeling tasks where you need to predict structured outputs based on features extracted from sequential data.
The package bundles CRFsuite and has no external runtime dependencies, making it lightweight to install. It supports Python 3.10 through 3.14 and is available as prebuilt wheels on major platforms. The binding exposes a trainer for fitting models and a tagger for inference, with a simpler codebase than some alternatives while remaining faster than the official SWIG wrapper.
Use it for:
- Named entity recognition: tag person, organization, location, and other entity types in text
- Part-of-speech tagging: label each word in a sentence with its grammatical role
- Information extraction: extract structured fields from unstructured text
- Chunking and segmentation: identify noun phrases, verb phrases, or other syntactic units
- Biomedical text mining: tag genes, proteins, diseases, or other domain entities in scientific literature
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Python binding to CRFsuite for conditional random field sequence labeling and structured prediction.
Yes, if you need a lightweight, dependency-free conditional random field library for sequence labeling. The package is stable, permissively licensed, and well-supported on modern Python versions. Install friction is moderate due to compiled extensions, but prebuilt wheels mitigate this for common platforms. Maintenance is aging but the repository remains active; suitable for established production use.
Install
python-crfsuite on PyPI
pip
pip install python-crfsuiteuv
uv add python-crfsuitepoetry
poetry add python-crfsuiteInstalling python-crfsuite
Before you install
Medium install friction due to compiled extensions, but prebuilt wheels are available for Python 3.10–3.14 on macOS, Linux (manylinux and musl), and Windows. Last release was 234 days ago; repository is active and not archived, though maintenance status is aging.
License in practice
MIT-licensed package with a bundled BSD-licensed CRFsuite C/C++ library. Both are permissive, so commercial and proprietary use is permitted without restriction.
Quickstart
pip install python-crfsuite
import python_crfsuite
trainer = python_crfsuite.Trainer(verbose=False)
trainer.append(xseq, yseq)
trainer.train('model.crfsuite')
Requires Python >=3.10. Prebuilt wheels exist for common platforms; source builds require a C/C++ compiler.
Verify before relying
- Whether the package is actively maintained or in maintenance-only mode given the 'aging' status
- Performance characteristics compared to alternative CRF implementations or wrappers
- Specific API surface and available methods beyond trainer and tagger interfaces
Package facts
| License | MIT License (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | none |
| Maintenance | aging — 234 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 6,340,213/month — #1,927 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: python_crfsuite-0.9.12-cp310-cp310-macosx_11_0_arm64.whl; python_crfsuite-0.9.12-cp310-cp310-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl; python_crfsuite-0.9.12-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl; python_crfsuite-0.9.12-cp310-cp310-musllinux_1_2_aarch64.whl; python_crfsuite-0.9.12-cp310-cp310-musllinux_1_2_x86_64.whl; python_crfsuite-0.9.12-cp310-cp310-win32.whl; python_crfsuite-0.9.12-cp310-cp310-win_amd64.whl; python_crfsuite-0.9.12-cp311-cp311-macosx_11_0_arm64.whl; python_crfsuite-0.9.12-cp311-cp311-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl; python_crfsuite-0.9.12-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl; python_crfsuite-0.9.12-cp311-cp311-musllinux_1_2_aarch64.whl; python_crfsuite-0.9.12-cp311-cp311-musllinux_1_2_x86_64.whl; python_crfsuite-0.9.12-cp311-cp311-win32.whl; python_crfsuite-0.9.12-cp311-cp311-win_amd64.whl; python_crfsuite-0.9.12-cp312-cp312-macosx_11_0_arm64.whl; python_crfsuite-0.9.12-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl; python_crfsuite-0.9.12-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl; python_crfsuite-0.9.12-cp312-cp312-musllinux_1_2_aarch64.whl; python_crfsuite-0.9.12-cp312-cp312-musllinux_1_2_x86_64.whl; python_crfsuite-0.9.12-cp312-cp312-win32.whl
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
sklearn-crfsuitesklearn-crfsuite wraps CRFsuite (Conditional…
permissive · top 15,000 on PyPI
probablepeopleParses unstructured person and company names…
permissive · top 15,000 on PyPI
tf2crfProvides a Conditional Random Field (CRF) layer…
permissive · top 15,000 on PyPI
seqevalseqeval evaluates the performance of sequence…
permissive · top 15,000 on PyPI
urduhackUrduhack provides NLP preprocessing,…
permissive · top 15,000 on PyPI
spacyspaCy is an industrial-strength NLP library…
permissive · top 1,000 on PyPI
usaddressusaddress parses unstructured US address…
permissive · top 5,000 on PyPI
rjiebaA Python binding to the Rust-based jieba-rs…
permissive · top 15,000 on PyPI
flairFlair is a PyTorch-based NLP framework that…
permissive · top 15,000 on PyPI
pymorphy2Morphological analyzer and inflection engine…
permissive · top 15,000 on PyPI