skillfed

python-crfsuite

Python binding for CRFsuite

python-crfsuite v0.9.12 6.3M downloads/30d#1,927 on PyPI774
Permissive license MIT License AGING released

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

uv

uv add python-crfsuite

poetry

poetry add python-crfsuite

Installing 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

Development Status :: 4 - BetaIntended Audience :: DevelopersIntended Audience :: Science/ResearchLicense :: OSI Approved :: MIT LicenseProgramming Language :: CythonProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Scientific/EngineeringTopic :: Scientific/Engineering :: Information AnalysisTopic :: Software DevelopmentTopic :: Software Development :: Libraries :: Python ModulesTopic :: Text Processing :: Linguistic

Tags

conditional random fields pythonsequence labeling librarynamed entity recognitionCRF structured predictionpython crfsuite bindingtext tagging modelinformation extraction
sequence-labelingstructured-predictionnlp

More Software Development packages