Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
C

crf

> 编程语言
Open source

A pure-Python implementation of the Linear-Chain Conditional Random Fields

100 stars0 likes0 views
WebsiteGitHub

About

A pure-Python implementation of the Linear-Chain Conditional Random Fields

crf

A pure python implementation of the Linear-Chain Conditional Random Fields

Dependencies

  • Numpy
  • Scipy

Usage

You can test this code with CoNLL 2000 Chunking Data.

Training

bash
# format
python3 crf_train.py  

# example
python3 crf_train.py data/chunking_small/small_train.data small_model.json

Test

bash
# format
python3 crf_test.py  

# example
python3 crf_test.py data/chunking_small/small_test.data small_model.json

Benchmark Result

  • Data: CoNLL corpus
    • data/chunking_full: original data (8936 sentences)
    • data/chunking_small: sampled data (77 sentences)
  • Compared with CRF++
  • Use feature set

Accuracy

crf CRF++
chunking_full 0.960128 0.960128
chunking_small 0.899072 0.889474

License

MIT

Reference

An Introduction to Conditional Random Fields / Charles Sutton, Andrew McCallum/ 2010

Issues· 2 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Python

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言