CRF的工具包,实现原理,及样例。CRF(Conditional Random Field) 条件随机场是近几年自然语言处理领域常用的算法之一,常用于句法分析、命名实体识别、词性标注等。在我看来,CRF就像一个反向的隐马尔可夫模型(HMM),两者都是用了马尔科夫链作为隐含变量的概率转移模型,只不过HMM使用隐含变量生成可观测状态,其生成概率有标注集统计得到,是一个生成模型;而CRF反过来通过可观测状态判别隐含变量,其概率亦通过标注集统计得来,是一个判别模型。由于两者模型主干相同,其能够应用的领域往往是重叠的,但在命名实体、句法分析等领域CRF更胜一筹。当然你并不必须学习HMM才能读懂CRF,但通常来说如果做自然语言处理,这两个模型应该都有了解。
SHOW FULL COLUMNS FROM `jrk_downrecords` [ RunTime:0.001262s ]
SELECT `a`.`aid`,`a`.`title`,`a`.`create_time`,`m`.`username` FROM `jrk_downrecords` `a` INNER JOIN `jrk_member` `m` ON `a`.`uid`=`m`.`id` WHERE `a`.`status` = 1 GROUP BY `a`.`aid` ORDER BY `a`.`create_time` DESC LIMIT 10 [ RunTime:0.108445s ]
SHOW FULL COLUMNS FROM `jrk_tagrecords` [ RunTime:0.001254s ]
SELECT * FROM `jrk_tagrecords` WHERE `status` = 1 ORDER BY `num` DESC LIMIT 20 [ RunTime:0.001883s ]
SHOW FULL COLUMNS FROM `jrk_member` [ RunTime:0.001386s ]
SELECT `id`,`username`,`userhead`,`usertime` FROM `jrk_member` WHERE `status` = 1 ORDER BY `usertime` DESC LIMIT 10 [ RunTime:0.003236s ]
SHOW FULL COLUMNS FROM `jrk_searchrecords` [ RunTime:0.000787s ]
SELECT * FROM `jrk_searchrecords` WHERE `status` = 1 ORDER BY `num` DESC LIMIT 5 [ RunTime:0.003649s ]
SELECT aid,title,count(aid) as c FROM `jrk_downrecords` GROUP BY `aid` ORDER BY `c` DESC LIMIT 10 [ RunTime:0.014300s ]
SHOW FULL COLUMNS FROM `jrk_articles` [ RunTime:0.001088s ]
UPDATE `jrk_articles` SET `hits` = 2 WHERE `id` = 256608 [ RunTime:0.018662s ]