Linear-chain conditional random fields for natural language processing
Project description
Chaine
Linear-chain conditional random fields for natural language processing.
Chaine is a modern Python library without third-party dependencies and a backend written in C. You can train conditional random fields for natural language processing tasks like named entity recognition.
- Lightweight: No use of bloated third-party libraries.
- Fast: Performance critical parts are written in C and thus blazingly fast.
- Easy to use: Designed with special focus on usability and a beautiful high-level API.
You can install the latest stable version from PyPI:
$ pip install chaine
Please refer to the introducing paper by Lafferty et al. for the theoretical concepts behind conditional random fields.
Minimal working example
>>> import chaine
>>> tokens = [["John", "Lennon", "was", "born", "in", "Liverpool"]]
>>> labels = [["B-PER", "I-PER", "O", "O", "O", "B-LOC"]]
>>> model = chaine.train(tokens, labels, max_iterations=5)
>>> model.predict(tokens)
[['B-PER', 'I-PER', 'O', 'O', 'O', 'B-LOC']]
Check out the examples for a more real-world use case.
Credits
This project 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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distributions
chaine-1.3.0-cp39-cp39-win_amd64.whl
(541.2 kB
view hashes)
chaine-1.3.0-cp39-cp39-win32.whl
(516.5 kB
view hashes)
chaine-1.3.0-cp38-cp38-win_amd64.whl
(541.3 kB
view hashes)
chaine-1.3.0-cp38-cp38-win32.whl
(516.7 kB
view hashes)
Close
Hashes for chaine-1.3.0-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f813e4ab2f5578842fa2ca40c397596a34bfd19e61c1ae10df99f6ece73e493f |
|
MD5 | f4cc0f288dc066d19dbbc9437d72ee69 |
|
BLAKE2b-256 | 338a55e98eca9ac292cb7e95adba9cbfba325593ab9a03fd851f3b34ff17a8e8 |
Close
Hashes for chaine-1.3.0-cp39-cp39-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 13e942c626d423885a42f61d4f2507ee7f41294c4c1f56cf60f4bcc905185ae6 |
|
MD5 | ab37dc5c23388d97c6959e99cd20fc32 |
|
BLAKE2b-256 | 6e3de199e718a2023a6c3438844356c2e17d527642adc9274db5033c910b0d14 |
Close
Hashes for chaine-1.3.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 637f6960cb67250c0d8c68435293b5550d4381bc0497def9cbd95470eddaa0d5 |
|
MD5 | b830995fef1c918a998f3d1f498cceec |
|
BLAKE2b-256 | dabf22713bd84001bf02ca0ad407fb8b968d185d0c9a8098e154e1ca908b42ae |
Close
Hashes for chaine-1.3.0-cp39-cp39-manylinux1_i686.manylinux_2_5_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bfb615d4d8194c5ca83e8ff3cac059eca3cfdadfd0948e870397b51ba454b29d |
|
MD5 | 8b8d3719375fa8568dc01c39dfa6b610 |
|
BLAKE2b-256 | 0261353f1077b1d99eab4e0809512da7fe9e0e9d7dc82a58d401f3e635345fee |
Close
Hashes for chaine-1.3.0-cp39-cp39-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a913dd1bc528f6987ae4bfbada3bb77115d210e3755ea8981eb47a6745f873b9 |
|
MD5 | 96e5feec6f744ed2f11972d3ac9ebf67 |
|
BLAKE2b-256 | 02415a99bf7671cc5e49dd169aa5aca22ae41ca972c1135c9613d71a53c70bc2 |
Close
Hashes for chaine-1.3.0-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 138c94e6c8578de9cc826345f300c0c1556c8cfddcdcf11f0fc3fa8dd50975fa |
|
MD5 | cc6063ea47e8ce3592e5b7820be33f87 |
|
BLAKE2b-256 | cb1842c4012102adff2758a521e8d8a11774f374363b8603b96e73aaeffd50fc |
Close
Hashes for chaine-1.3.0-cp38-cp38-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3ae0b2525ce25e419378e4238c62a79a30a46ef3f03d5bf59b9b8794b8aaad58 |
|
MD5 | f5edddf57d15d1029d7b3dab3bdff208 |
|
BLAKE2b-256 | 724fa9a39cb84aadf6e5071d2a3f2fbf7d38a10f2042bafda089a430fc9c7db1 |
Close
Hashes for chaine-1.3.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fd9a3c4182ec487bd7a42bc3acdb746cfc4ccc5a1f8f22730106cc29922debea |
|
MD5 | a3e85696098067299bd34d2250781f55 |
|
BLAKE2b-256 | 1a3d7c41d7ff4527162a3cce5840f13e7e462b80e8d984bfb9740a2ba13bb191 |
Close
Hashes for chaine-1.3.0-cp38-cp38-manylinux1_i686.manylinux_2_5_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b281e4f4982573d8e9382c8bff15474251434e05e6c4963445da4e165d225bc5 |
|
MD5 | a0e2ef4293f07c678b559834b081867d |
|
BLAKE2b-256 | 746ef46f50041adbdefc7483e81047258ea4ea08af8136a25db35cf83f89909e |
Close
Hashes for chaine-1.3.0-cp38-cp38-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bb217ac3daf0aa90d8099d59b82ba8d84d7a9b71dafce169d66b1aebb94ed1b6 |
|
MD5 | 7393fb8fb8f196e657706034ebb0f2b4 |
|
BLAKE2b-256 | 64108ce5d367ca61fa75f9d95bfe670fabd0d48afbad523731a3a29911004dc1 |