A Lightweight Conditional Random Field
Project description
A Lightweight Conditional Random Field
This is a modern Python library without any third-party dependencies and a backend written in C implementing conditional random fields for natural language processing tasks like named entity recognition or part-of-speech tagging.
You can install the latest stable version from PyPI:
$ pip install chaine
If you are interested in the theoretical concepts behind conditional random fields, I can recommend the introducing paper by Lafferty et al.
Example
>>> import chaine
>>> sequences = [[["a", "a"], ["b", "b"]]]
>>> labels = [["0", "1"]]
>>> model = chaine.train(sequences, labels)
>>> model.predict(sequences)
[['0', '1']]
Check out the introducing Jupyter notebook.
Credits
This library makes use of and is partially based on:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
chaine-0.2.0.tar.gz
(116.0 kB
view hashes)
Built Distributions
Close
Hashes for chaine-0.2.0-cp39-cp39-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e16851d4ef1a6645e6565f55e9304c3cf70b1dab4fdcc69c630228949252298b |
|
MD5 | ee17c9dd35709314480fe8a7fac21297 |
|
BLAKE2b-256 | bb5ae702ea52783470ae3bfcb685db80745c3b9e4cdfd2fecf4d65e6259d2dea |
Close
Hashes for chaine-0.2.0-cp38-cp38-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 082dae7e7170b36bd2ab61016e05a3cb9bd1d4944be3726c53d880b7001882c1 |
|
MD5 | afd8967a886fb5a4d6e4c89cf215099b |
|
BLAKE2b-256 | 9d39b1fae305615e04e0a60a7f1a1894f22fd69e4dc756d409889580b0bef8a3 |