1. 首页
  2. 数据库
  3. 其它
  4. hmm ner cws 源码

hmm ner cws 源码

上传者: 2021-04-25 12:03:28上传 ZIP文件 53.74KB 热度 15次
hmm-ner-cws 马尔可夫链 HMM建立在MarkovChain上,下图是MarkovChain的参数可视化: 唔 经典的HMM模型用作NER和CWS任务。 使用HMM进行中文分词, $ python3 task_cws.py 使用HMM进行NER, $ python3 task_ner.py 状态矩阵的可视化: 对比jieba jieba分词的HMM已经带有权重,这里实现的HMM使用ctb6训练权重,对比代码如下: import jieba from task_cws import tokenizer import dataset for text in dataset . load_sentences (): print ( jieba . lcut ( text , HMM = True )) print ( tokenizer . cut ( text
下载地址
用户评论