--- id: sklearn-crfsuite version: "0.5.0" license: MIT license license_treatment: permissive maintenance: active --- # sklearn-crfsuite — CRFsuite (python-crfsuite) wrapper which provides interface simlar to scikit-learn License: permissive · Maintenance: active · Downloads: 591.8K/mo ## What it is and what it does sklearn-crfsuite is a thin wrapper around python-crfsuite that exposes Conditional Random Fields (CRFs) through a scikit-learn compatible interface. CRFs are a machine learning model designed for sequence labeling tasks—predicting a label for each element in a sequence, where the prediction for one element can depend on surrounding elements. This is useful for problems like named entity recognition, part-of-speech tagging, or any task where you need to label sequences of data. Because it follows scikit-learn's estimator API, you can use all of scikit-learn's standard tools with it: cross-validation, grid search for hyperparameter tuning, pipeline integration, and model serialization with joblib. The package includes utility functions for sequence-level metrics (like sequence_accuracy_score) and flat metrics (precision, recall) tailored to sequence labeling evaluation. Recent updates (0.5.0) ensure compatibility with modern scikit-learn versions by returning numpy arrays from predict methods. Use it for: - Named entity recognition: label person names, organizations, and locations in text using CRF with scikit-learn's cross-validation. - Part-of-speech tagging: predict grammatical tags for words in sentences, leveraging scikit-learn's hyperparameter tuning. - Information extraction: extract structured fields from documents by labeling token sequences with CRF models. - Biomedical text mining: identify gene and protein mentions in scientific abstracts using sequence labeling. - Slot filling in dialogue systems: label user utterance tokens to extract intent slots for conversational AI. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. sklearn-crfsuite wraps CRFsuite (Conditional Random Fields) as a scikit-learn compatible estimator, letting you train sequence labeling models using scikit-learn's standard tools like cross-validation and hyperparameter optimization. Yes. The package is actively maintained, has no known vulnerabilities, low install friction, and solves a real problem—making CRFs accessible within scikit-learn workflows. Use it if you need sequence labeling and want to leverage scikit-learn's ecosystem for model selection and evaluation. The MIT license adds no restrictions. ## Install pip install sklearn-crfsuite uv add sklearn-crfsuite poetry add sklearn-crfsuite ## Installing sklearn-crfsuite Before you install: Low friction: pure Python wheel with four straightforward runtime dependencies (python-crfsuite, scikit-learn, tabulate, tqdm). Actively maintained as of April 2026 with recent fixes to numpy array compatibility. License in practice: MIT license is permissive; you can use this package in commercial and proprietary projects without restriction, though you must include the license notice. Quickstart: pip install sklearn-crfsuite from sklearn_crfsuite import CRF crf = CRF() crf.fit(X_train, y_train) predictions = crf.predict(X_test) Verify before relying: - Whether the package's 'Alpha' status reflects actual stability concerns or is simply outdated classifier metadata. - Performance characteristics and typical model training time for large sequence datasets. ## Package facts - License: MIT license (permissive) - Python support: unspecified - Install friction: low - Maintenance: active - Downloads: 591.8K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags conditional random fields scikit-learn, CRF sequence labeling, sklearn compatible CRF estimator, named entity recognition CRF, sequence tagging with scikit-learn, python-crfsuite wrapper, structured prediction sklearn, sequence-labeling, conditional-random-fields, nlp [View on SkillFed](https://skillfed.io/packages/sklearn-crfsuite) · [View on PyPI](https://pypi.org/project/sklearn-crfsuite/)